linux服务器 ssh密钥登陆

xiaoxiao2021-02-28  79

参考网站:

http://www.runoob.com/w3cnote/set-ssh-login-key.html

1.

ssh-keygen -t  rsa

2.

把 ~/.ssh 生成的 id_rsa.pub 传到服务器上,写在 ~/.ssh/authorized_keys 后面

3.

~/.ssh 权限设为700

 ~/.ssh/authorized_keys 权限设为600

4.

如果还不行,将用户改为自己所用的用户,默认是root:root

转载请注明原文地址: https://www.6miu.com/read-34638.html

最新回复(0)