Bug 1161454 - ssh-keygen with error : gethostname: File name too long
Summary: ssh-keygen with error : gethostname: File name too long
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openssh
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelen
QA Contact: Stanislav Zidek
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-07 07:42 UTC by Karel Srot
Modified: 2015-07-22 06:46 UTC (History)
8 users (show)

(edit)
* The user could not generate ssh keys on hosts with a host name of 64 characters. The ssh-keygen utility failed in this situation. The buffer size for host names has been increased, and ssh-keygen no longer fails in the described
situation. (BZ#1161454)
Clone Of: 1097665
(edit)
Last Closed: 2015-07-22 06:46:56 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1335 normal SHIPPED_LIVE openssh bug fix and enhancement update 2015-07-20 17:52:59 UTC
OpenSSH Project 2239 None None None Never

Description Karel Srot 2014-11-07 07:42:20 UTC
Bug present on rhel-6.6 too.

+++ This bug was initially created as a clone of Bug #1097665 +++

Description of problem:
when installing openstack on redhat 7.0 beta  with dynamic ipv4 address , ssh-keygen fails .
 

07:15:01 ERROR : Failed to run remote script, stdout: 
07:15:01 stderr: + trap t ERR
07:15:01 + ssh-keygen -t rsa -b 2048 -f /var/tmp/packstack/20140514-011453-k9pyaJ/nova_migration_key -N ''
07:15:01 gethostname: File name too long
07:15:01 ++ t
07:15:01 ++ exit 1

Version-Release number of selected component (if applicable):


How reproducible:
1. vm redhat 7.0  with dynamic ip address 
2. installing openstack with packstack 
3. fails on ssh-keygen with error :  gethostname: File name too long



Actual results:


Expected results:
ssh-keygen should not fail 

Additional info:

--- Additional comment from Pavel Šimerda (pavlix) on 2014-05-14 05:51:44 EDT ---

As `gethostname()` is a libc library call, I'm switching the bug report to the glibc package.

--- Additional comment from Siddhesh Poyarekar on 2014-05-15 02:31:04 EDT ---

gethostname tells it like it is - the hostname is longer than what the application anticipated (with its len argument).  The fix to this is to increase the buffer size passed to gethostname and repeat the call.

That is, it's not a bug in glibc.

--- Additional comment from Pavel Šimerda (pavlix) on 2014-05-15 11:15:30 EDT ---

Thanks Siddhesh, (In reply to Siddhesh Poyarekar from comment #3)
> gethostname tells it like it is - the hostname is longer than what the
> application anticipated (with its len argument).  The fix to this is to
> increase the buffer size passed to gethostname and repeat the call.

True enough, thanks.

> That is, it's not a bug in glibc.

Moving to OpenSSH then, where the calling program resides.

--- Additional comment from Petr Lautrbach on 2014-07-15 07:47:11 EDT ---

upstream patch https://bugzilla.mindrot.org/attachment.cgi?id=2448&action=diff

Comment 5 errata-xmlrpc 2015-07-22 06:46:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1335.html


Note You need to log in before you can comment on or make changes to this bug.