Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1024 - /etc/init.d/sshd does not properly create ssh v1 RSA hostkey file
Summary: /etc/init.d/sshd does not properly create ssh v1 RSA hostkey file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-08 18:03 UTC by Michael Thompson
Modified: 2002-03-15 21:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
diff to fix sshd.rc6 (sshd.rc6.diff,409 bytes, patch)
2002-03-08 18:04 UTC, Michael Thompson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Thompson 2002-03-08 18:03:47 UTC
After updating to openssh-3.1_p1 on a new Gentoo system, I noticed that the 
/etc/init.d/sshd script gave this message when starting:

You must specify a key type (-t).
Usage: ssh-keygen [options]
Options:
  -b bits     Number of bits in the key to create.
  -c          Change comment in private and public key files.
  -e          Convert OpenSSH to IETF SECSH key file.
  -f filename Filename of the key file.
  -i          Convert IETF SECSH to OpenSSH key file.
  -l          Show fingerprint of key file.
  -p          Change passphrase of private key file.
  -q          Quiet.
  -y          Read private key file and print public key.
  -t type     Specify type of key to create.
  -B          Show bubblebabble digest of key file.
  -C comment  Provide new comment.
  -N phrase   Provide new passphrase.
  -P phrase   Provide old passphrase.

When hostkey files are deleted, the script properly creates ssh v2 DSA and RSA 
hostkeys, it only fails when attempting to create the ssh v1 RSA hostkey.

The file /usr/portage/net-misc/openssh/files/sshd.rc6 which is used copied to 
/etc/init.d/ during merging is missing an option in line 24.  It should read:

                /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key 
-N ''

This bug forces one to manually create an ssh v1 RSA hostkey.  I will attach a 
patch.
Comment 1 Michael Thompson 2002-03-08 18:04:43 UTC
Created attachment 312 [details, diff]
diff to fix sshd.rc6
Comment 2 Bruce A. Locke (RETIRED) gentoo-dev 2002-03-15 21:47:02 UTC
Thanks for the bug report... remerge openssh for the updated initscript