当前位置:   article > 正文

ssh免密钥登录的坑_1 key(s) remain to be installed -- if you are prom

1 key(s) remain to be installed -- if you are prompted now it is to install

有工程通过页面上不小心把/home/admin下面所有目前都改成777后,导致.ssh改成700也不管用,~/.ssh/authorized_keys就算改成了600都不管用的场景。SSH的免密钥登录永远都不能成功。

Connection to hsslave3 closed.
[admin@hsmaster .ssh]$ ssh-copy-id hsslave4
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
admin@hsslave4's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'hsslave4'"
and check to make sure that only the key(s) you wanted were added.

[admin@hsmaster .ssh]$ ssh hsslave4
Last login: Fri Apr 12 15:00:13 2019
[admin@hsslave4 ~]$ exit;
登出
Connection to hsslave4 closed.
[admin@hsmaster .ssh]$ ssh-copy-id localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is e4:ba:d6:b9:68:43:7d:81:4a:d9:3d:77:f9:1e:9a:c1.
Are you sure you want to continue connecting (yes/no)? yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
admin@localhost's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'localhost'"
and check to make sure that only the key(s) you wanted were added.

[admin@hsmaster .ssh]$ ssh localhost
admin@localhost's password: 
Last login: Fri Apr 12 17:18:05 2019 from hsmaster
[admin@hsmaster ~]$ exit;
登出
Connection to localhost closed.
[admin@hsmaster .ssh]$ ssh localhost
admin@localhost's password: 
Last login: Fri Apr 12 17:25:51 2019 from localhost

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/187767
推荐阅读
相关标签
  

闽ICP备14008679号