1、服務(wù)器上~/.ssh權(quán)限一定要正確:
# paste these into an SSH session that server (probably from
# another user account or root)
# change this to YOUR username on the server.
UN=example
# paste these lines verbatim:
sudo chown $UN:$UN /home/$UN/{.,.ssh/,.ssh/authorized_keys}
sudo chmod u+rwX,go-rwX,-t /home/$UN/{.ssh/,.ssh/authorized_keys}
sudo chmod go-w /home/$UN/
2合溺、客戶機的私鑰權(quán)限也要正確:
報錯:It is required that your private key files are NOT accessible by others.
修改權(quán)限:
chmod 600 ~/.ssh/id_rsa