ssh 公钥登录远程主机 并禁止密码登录

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-centos7

 

如果在新的机器上,得先用密码登录一次,才能把本地的公钥上传到服务上,然后免密码登录,否则是没有权限的,会提示permission denied

 

连接普通用户的密码是 sudo的密码

然后同样的方式,设置公钥登录即可

posted @ 2019-05-08 09:48  忘记时间zms  阅读(167)  评论(0编辑  收藏  举报