Bug 865803 - RFE: Fully support relocatable host encryption keys
RFE: Fully support relocatable host encryption keys
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: openssh (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Lautrbach
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-12 09:33 EDT by John Florian
Modified: 2013-04-25 20:56 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-25 20:56:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Simple patch to allow specification of alternate host key location(s) via /etc/sysconfig/sshd (688 bytes, patch)
2013-03-25 14:32 EDT, John Florian
no flags Details | Diff

  None (edit)
Description John Florian 2012-10-12 09:33:06 EDT
Description of problem:
While it is possible to direct sshd to load its keys from a non-standard location using HostKey settings in /etc/ssh/sshd_config, the key generation process (via /usr/sbin/sshd-keygen) does not honor those same settings.

Why relocate the keys?  I make custom Live Fedora spins (for embedded systems) that are then transferred to Flash media so that for the most part Fedora is stateless.  However, I don't wish it be entirely stateless.  For example, I wish to keep the host's ssh encryption keys external to the Live image (and stored elsewhere on the Flash media).  While it's easy to make sshd honor this wish, sshd-keygen will not.

I'm willing to put a patch together for Fedora to make sshd-keygen create the keys where indicated by sshd_config, if I thought the effort might be accepted into Fedora.  The patch would be troubled in only one way that I can envision in that the type of key to be generated would have to be inferred from the name of the key file since the "HostKey" setting name offers no such clues.

Perhaps a more acceptable approach would be to simply allow RSA1_KEY, RSA_KEY and DSA_KEY (of the sshd-keygen script) to be overridden in /etc/sysconfig/sshd.  Obviously this would mean that both config files would need to match in their settings, but I guess that's no worse than what's present now.

Would it be possible to get such an improvement into Fedora?
Comment 1 John Florian 2013-03-25 14:32:06 EDT
Created attachment 716138 [details]
Simple patch to allow specification of alternate host key location(s) via /etc/sysconfig/sshd

I am presently using this patch.  It merely sources the config **after** the *_KEY variables have been set (to a default value) in /usr/sbin/sshd-keygen.  This makes it trivial to override the default values, if needed, otherwise has no change in behavior from present.

Having this patch in Fedora would be nice for those of us who need such flexibility, but would prefer to not have to maintain such a patch on an on going basis.
Comment 2 Petr Lautrbach 2013-03-26 10:49:39 EDT
Looks good, applied. Thanks. It will be in the next openssh update.

http://pkgs.fedoraproject.org/cgit/openssh.git/commit/?id=811ec1dd368fff55a11fa6a1fcd6ee7c0f4ae466
Comment 3 John Florian 2013-03-26 11:29:48 EDT
Thanks so much Petr!
Comment 4 Fedora Update System 2013-04-17 12:19:16 EDT
openssh-6.1p1-7.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/openssh-6.1p1-7.fc18
Comment 5 Fedora Update System 2013-04-17 22:28:15 EDT
Package openssh-6.1p1-7.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openssh-6.1p1-7.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5918/openssh-6.1p1-7.fc18
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-04-23 21:24:49 EDT
Package openssh-6.1p1-8.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openssh-6.1p1-8.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5918/openssh-6.1p1-8.fc18
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2013-04-25 20:56:57 EDT
openssh-6.1p1-8.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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