有三种情况:
1. ssh localhost
error: connection refused at port 22
solution:
use root user to edit /etc/ssh/sshd_conf add:
ListenAddress 0.0.0.0:22
and
/etc/init.d/sshd restart
2. ssh localhost
error: Permission denied (publickey,gssapi-with-mic)
solution:
disable gssapi in /etc/ssh/sshd_conf:
GSSAPIAuthentication no
and
/etc/init.d/sshd restart
3. ssh localhost
error: Permission denied (publickey)
when view /var/log/secure
Authentication refused: bad ownership or modes for file /home/adwiser/.ssh/authorized_keys
solution:
Check there permissions on the ~/.ssh directory should be 700,
and the authorized_keys file should be 600
so execute shell:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
How to resole "ssh localhost" failed when config Hadoop
最新推荐文章于 2025-12-01 20:38:42 发布
本文针对SSH连接遇到的不同错误提供了解决方案,包括连接被拒绝、权限被拒绝等问题,并提供了具体的配置修改步骤。
1412

被折叠的 条评论
为什么被折叠?



