1.ubuntu the system is running in low-graphics mode 解决办法
我是因为修改权限造成的,可能解决方案:
方案1:
sudo apt-get install fglrx
sudo reboot
方案2:
sudo apt-get update
sudo apt-get purge flglrx
sudo reboot
2.当使用ssh 无密远程登录主机时候会报这个错误
The authenticity of host '192.168.121.180 (192.168.121.180)' can't be established. ECDSA key fingerprint is SHA256:V72BMtFPFfXTpnctqsq9fuyuZqZprtaYzXFBkGhYcSQ. Are you sure you want to continue connecting (yes/no)? yes Failed to add the host to the list of known hosts (/home/python/.ssh/known_hosts).
那是因为我们主机是user用户,加了sudo ~/.ssh文件会默认为root所有,当我们ssh远程连接时候就必须加sudo 连接。
解决方法1:可以修改.ssh文件的所有权
sudo chgrp user /home/user/.ssh/id_rsa.pub
!不建议使用这种方法,因为这样可能会出现一些问题,因为也会绕很多弯子。
方法2:
作为普通用户,用sudo权限去修改配置文件/etc/ssh/sshd_config
$ sudo vim /etc/ssh/sshd_config ...
RSAAuthentication yes # 启用 RSA 认证
PubkeyAuthentication yes # 启用公钥私钥配对认证方式
AuthorizedKeysFile %h/.ssh/authorized_keys # 公钥文件路径 ...
重启SSH服务(不同版本有不同的重启方式):
$ sudo service ssh restart
创建私钥和公钥
创建密钥对时,一定不要在命令前加sudo
创建密钥对时,一定不要在命令前加sudo
创建密钥对时,一定不要在命令前加sudo
-t 指定类型,-f指定文件生成路径,-P指定文件密码(''表示无密码)
$ ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ''
Generating public/private rsa key pair.
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
he key fingerprint is:
SHA256:sRWB6v9sTYvBAJVc40QFZs49JQuQVkPjB6fRc7xETDM user@192.168.121.180
The key's randomart image is:
+---[RSA 2048]----+ | ooX^=+=E | | . *O %o+=o | | +. B =+ . | | . .+ . .. | | . So | | . o . | | . = . | | ..o o | | oo | +----[SHA256]-----+
此时生成了一对密钥
公钥:id_rsa.pub
密钥:id_rsa
将生成的公钥(id_ras.pub)拷贝至另外一台服务器
ssh-copy-id -i ~/.ssh/id_rsa.pub user@192.168.121.180