簡體   English   中英

特定計算機拒絕ssh登錄權限

[英]ssh login permission denied from a specific machine

我嘗試通過SSH從3台計算機A,B和C登錄服務器。A來自我的家,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給我一個權限被拒絕的問題。 但是,從主機CI可以成功登錄到另一個ssh服務器。

主機A和C是debian,B是centOS。

胡亂猜測。 在同一個網絡中時也許使用內部IP?

檢查/ etc / ssh / sshd_config(Centos)中的AllowUsers指令,這可以為SSH訪問設置user @ ip級別。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM