next up previous contents
Next: Code Injection Up: SSH 相關問題 Previous: IPTABLES   Contents

Connection reset by peer

  1. 登入主機 kvm7.deyu.wang 出現以下訊息:
    [root@dyw219 ~]# ssh kvm7.deyu.wang
    Read from socket failed: Connection reset by peer
    
  2. 開啟 kvm7.deyu.wang 終端機,重新産生 ssh key。
    [root@kvm7 ~]# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
    [root@kvm7 ~]# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
    
  3. 刪除 client 端信任主機紀錄。
    [root@dyw219 ~]# sed -i '/kvm7/d' .ssh/known_hosts
    
  4. 成功登入。
    [root@dyw219 ~]# ssh kvm7.deyu.wang
    Warning: Permanently added 'kvm7.deyu.wang,192.168.122.7' (RSA) to the list of known hosts.
    root@kvm7.deyu.wang's password: 
    Last login: Tue Sep 22 13:10:21 2015 from dynamic5.deyu.wang
    


2016-06-02