我尝试通过 ssh 从 3 台机器(A、B 和 C)登录服务器。A 来 self 家,B 和 C 来自学校网络。我可以从 A 和 B 登录 ssh 服务器,但不能从 C 登录。在主机 C 上,我得到这个:
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'mynet.com' is known and matches the RSA host key.
debug1: Found key in /home/myname/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/myname/.ssh/id_rsa
debug1: Trying private key: /home/myname/.ssh/id_dsa
debug1: Next authentication method: password
ssh_userA@mynet.com's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
ssh_userA@mynet.com's password:
我已经在 ssh 服务器上完成了以下操作。
我已将/etc/hosts.allow 和/etc/hosts.deny 更改为另一个临时名称并重新加载/etc/init.d/ssh
我已经执行了 iptables -F 来清理所有防火墙规则,并执行了 iptables -L 来验证它是否全部打开。
我确定 ssh_userA 的密码是正确的,因为我可以用它从 A 和 B 登录。我还尝试添加一个新用户 ssh_userB。问题仍然存在,只有主机 C 给我一个权限被拒绝的问题。但是,我可以从主机 C 成功登录到另一个 ssh 服务器。
主机A和C是debian,B是centOS。
最佳答案
胡乱猜测。当您在同一网络中时,也许使用内部 IP?
关于linux - 特定机器拒绝 ssh 登录权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23984705/