Bug 865803 - RFE: Fully support relocatable host encryption keys
Summary: RFE: Fully support relocatable host encryption keys
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-12 13:33 UTC by John Florian
Modified: 2013-04-26 00:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-26 00:56:55 UTC
Type: Bug
Embargoed:


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 18:32 UTC, John Florian
no flags Details | Diff

Description John Florian 2012-10-12 13:33:06 UTC
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 18:32:06 UTC
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 14:49:39 UTC
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 15:29:48 UTC
Thanks so much Petr!

Comment 4 Fedora Update System 2013-04-17 16:19:16 UTC
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-18 02:28:15 UTC
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-24 01:24:49 UTC
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-26 00:56:57 UTC
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.