CentOS实战 / SSH Between Host Not Working解决办法

前端之家收集整理的这篇文章主要介绍了CentOS实战 / SSH Between Host Not Working解决办法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

I have server A and server B and can ssh from server A to server B if I’m logged in as the user whose keys have been set up

But,I can’t do user@serverB from server A logged in as another user

and I can’t do the following to allow the user to ssh to the local server

-bash-4.2$ ssh-copy-id jenkins@localhost
/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
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Check if “PasswordAuthentication” is set to “no” in /etc/ssh/sshd_config on the remote system if so,then change it to “yes” and restart sshd service and then check. By default this is set to “yes”.

[root@ansible-host ~]# grep ^PasswordAuthentication /etc/ssh/sshd_config 
PasswordAuthentication yes

重启sshd服务器

sudo systemctl restart sshd

参考文献
SSH Between Host Not Working

原文链接:https://www.f2er.com/centos/374160.html

猜你在找的CentOS相关文章