ssh連接有問題:ssh服務器拒絕了密碼 請再試一次 Socket error Event: 32 Error: 10053. Connection closing...Socket close.

錯誤描述:

ssh 登陸服務器,輸入正確的賬號密碼,然後提示 “ssh服務器拒絕了密碼 請再試一次”,
“Socket error Event: 32 Error: 10053. Connection closing…Socket close.”

解決1:開啓遠程密碼登陸

已經開啓了基本的ssh配置,仍然不行

vi /etc/ssh/sshd_config
修改 PermitRootLogin yes
/etc/init.d/ssh restart

解決2:sshd服務檢查有問題(權限不足,缺少rsa文件)

可能檢測到的錯誤:
error: bad permissions: ignore key: /etc/ssh/ssh_host_ecdsa_key
error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
error: Could not load host key: /etc/ssh/ssh_host_ed25519_key

  1. sudo sshd -t 進行sshd服務檢查,
  2. 如果提示權限不做,則修改文件權限chmod 0600 ssh_host_ecdsa_key。我的是提示缺少 rsa文件,通過 ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_ed25519_key 命令生成rsa文件即可。
  3. 直到"sudo sshd -t",無任何提示後,再進行ssh連接,成功。
    注:本人操作如下,連接正常,歡迎留言。
    自己操作結果
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章