linux - 特定机器拒绝 ssh 登录权限

标签 linux ssh

我尝试通过 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/

相关文章:

git - 使用 sshpass 和私钥时 SSH 挂起

git - 远程在 Git 服务器上创建一个裸仓库

python - Paramiko 协议(protocol)错误 : expected packet SSH_MSG_USERAUTH_REQUEST, 得到 SSH_MSG_SERVICE_REQUEST

java - 如何在使用 JSch SFTP 库时解析 Java UnknownHostKey?

linux - 未检测到 OMAP 3 Linux I2C SMBUS SmartBattery (SBS)

c - 来自 realloc() 的奇怪行为

c - 在不同接口(interface)上接收具有相同源地址的不同组播

c - 为什么我不能将指向结构的指针保存为指向指针数组的指针的索引?

linux - 更新 EC2 实例上的 Rstudio 服务器

git - 为什么 cap deploy 给出 Permission denied (publickey)?