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

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native