ssh-keygen fails to create keys when FQDN=64 chars

Bug #1486654 reported by Javier Bahillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
New
Undecided
Unassigned

Bug Description

According to RFC's a FQDN hostname may have up to 64 chars. Nevertheless ssh-keygen fails to create a key when it has exactly these 64 chars:

Hostname (edited to hide , but with same amount of chars):

abcde-frontend-abcde-frontend-2-i-9b90b8d9.dyn.abcde.abcdfer.com

It fails with this message:
gethostname: File name too long

Not being able to create a key means that openssh-server postinst will fail with this message:

Setting up openssh-server (1:6.6p1-2ubuntu1) ...
Creating SSH2 ED25519 key; this may take some time ...gethostname: File name too long
dpkg: error processing package openssh-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 openssh-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Tested on:
Ubuntu 14.04 LTS

openssh-client versions tested:
  Installed: 1:6.6p1-2ubuntu1
  Candidate: 1:6.6p1-2ubuntu2.3

Looks like s imilar bug report on RedHat bug tracker: https://bugzilla.redhat.com/show_bug.cgi?id=1097665

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.