Bug 1051490

Summary: ssh-keygen fails to generate key when the host name is 64 byte
Product: [Fedora] Fedora Reporter: Attila Fazekas <afazekas>
Component: opensshAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: lnie, mattias.ellert, mgrepl, plautrba, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openssh-6.4p1-5.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-22 03:30:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Attila Fazekas 2014-01-10 12:29:56 UTC
Description of problem:

sshd fails to start when the hostname is 64 byte.


Version-Release number of selected component (if applicable):
openssh-6.3p1-5.fc20.x86_64, openssh-server-6.4p1-3.fc20.x86_64, openssh-6.2p2-7.fc19.x86_64

How reproducible:
always

Steps to Reproduce:
1. hostname abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcd
2. /usr/bin/ssh-keygen -q -t "ecdsa" -f /tmp/foo-$RANDOM  -C "" -N ""

Actual results:
$ /usr/bin/ssh-keygen -q -t "ecdsa" -f /tmp/foo-$RANDOM  -C "" -N ""
gethostname: File name too long

The above command called by:
$ sshd-keygen 
Generating SSH2 ECDSA host key:                            [FAILED]

$ service sshd restart
Redirecting to /bin/systemctl restart  sshd.service
Job for sshd.service failed. See 'systemctl status sshd.service' and 'journalctl -xn' for details.

From the journalctl -xn:
# sshd-keygen[17739]: Generating SSH2 ECDSA host key: [FAILED]
# systemd[1]: sshd.service: control process exited, code=exited status=1
# systemd[1]: Failed to start OpenSSH server daemon.

The ssh server does not able to start.

Expected results:
The key file can be generated, and the sshd starts up.

Additional info:

Comment 1 Fedora Update System 2014-07-18 07:11:34 UTC
openssh-6.4p1-5.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/openssh-6.4p1-5.fc20

Comment 2 lnie 2014-07-18 08:47:36 UTC
openssh-6.4p1-5.fc20 works

Comment 3 Fedora Update System 2014-07-19 06:01:19 UTC
Package openssh-6.4p1-5.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openssh-6.4p1-5.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8504/openssh-6.4p1-5.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-07-22 03:30:49 UTC
openssh-6.4p1-5.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.