问题原文
原帖链接 · nitin · CC BY-SA 4.0
I compiled OpenSSH_6.6p1 on one of our server. I am able login via SSH to the upgraded server. But I am not able to connect to other servers running OpenSSH_6.6p1 or OpenSSH_5.8 from this. While connecting I am getting an error as below.
Read from socket failed: Connection reset by peer
On the destination server in the logs, I am seeing it as below.
sshd: fatal: Read from socket failed: Connection reset by peer [preauth]
I tried specifying the cipher_spec [ ssh -c aes128-ctr destination-server ] as mentioned in ssh 'connection reset by peer' problem since 5.8p1 (archived version) and was able to connect. How can configure ssh to use the cipher by default? Why is the cipher required here?
社区高分解答
原帖链接 · Jānis Konošonoks · CC BY-SA 3.0
My way to fix it, hope it helps someone :
# Recreate host keys
sudo rm /etc/ssh/ssh_host_*
sudo ssh-keygen -A
# Re-install SSh
sudo apt-get --reinstall install openssh-server openssh-client
Edit sshd_config by adding a value
add : MaxAuthTries 3
Edit ssh_config by uncommenting a value
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
