Bug 754779

Summary: no connect, Read from socket failed: Connection reset by peer.
Product: [Fedora] Fedora Reporter: Daniel <daniel>
Component: opensshAssignee: Jan F. Chadima <jchadima>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: jchadima, mattias.ellert, mgrepl, plautrba, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openssh-5.8p2-21.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-20 18:57:16 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Daniel 2011-11-17 12:32:26 EST
Description of problem: I have 2 F16 boxes, one notebook (i386) and one server (x86_64). After a fresh install on both machines I could't connect from the notebook yo the server anymore. I had an error message like "Read from socket failed: Connection reset by peer.". I tried to shorten the keys, dumped the connection data to analyze it.


Version-Release number of selected component (if applicable):
openssh-5.8p2-16.fc16.1.x86_64


Additional info: In the end the solution was very simple. Taking a look into /var/log/messages on the server there was written:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0640 for '/etc/ssh/ssh_host_rsa_key' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key
error: Could not load host key: /etc/ssh/ssh_host_rsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0640 for '/etc/ssh/ssh_host_dsa_key' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key

After changing the permissions to 0400 the problem disappeared and after a restart of shd on the server I could connect from the notebook again.

Maybe these permissions should set by default in that package.
Comment 1 Fedora Update System 2011-11-18 04:40:32 EST
openssh-5.8p2-21.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/openssh-5.8p2-21.fc16
Comment 2 Fedora Update System 2011-11-19 01:07:11 EST
Package openssh-5.8p2-21.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openssh-5.8p2-21.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16144/openssh-5.8p2-21.fc16
then log in and leave karma (feedback).
Comment 3 Fedora Update System 2011-11-20 18:57:16 EST
openssh-5.8p2-21.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Daniel 2011-11-21 02:27:06 EST
Thank you, everything is okay now!