建立密匙ssh
ssh-keygen -t rsa
經過XFTP刪除並替換生成的密匙(自用)code
生成authorized_keys文件it
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
修改SSH登錄配置io
vi /etc/ssh/sshd_config
修改如下內容配置
#LoginGraceTime 2m PermitRootLogin yes StrictModes no #MaxAuthTries 6 #MaxSessions 10 PubkeyAuthentication yes PasswordAuthentication no
從新讀取配置文件不會,直接重啓了。rsa