Bug 1268819 - allow SSH public key configuration as an alternative to password
Summary: allow SSH public key configuration as an alternative to password
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-05 11:36 UTC by Pavel Šimerda (pavlix)
Modified: 2017-08-08 12:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 12:17:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Šimerda (pavlix) 2015-10-05 11:36:48 UTC
When installing a server system using virt-manager and the default installation method, one has to configure a user or a root password but it would be often more practical to type a URL of an SSH public key and leave root password locked than to make up a password that would then not be used.

That applies especially now that Anaconda has no obvious way to force a specific password when it is considered weak.

Comment 1 Brian Lane 2015-10-05 18:57:44 UTC
FWIW you can embed ssh keys in kickstart files:

https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst#sshkey

Comment 2 David Shea 2015-10-23 17:55:29 UTC
Would the kickstart solution be acceptable if anaconda were changed so that it does not require a password for root when an sshkey has been provided?

Comment 3 Pavel Šimerda (pavlix) 2015-10-23 18:54:27 UTC
(In reply to David Shea from comment #2)
> Would the kickstart solution be acceptable if anaconda were changed so that
> it does not require a password for root when an sshkey has been provided?

That would be indeed nice.

Anyway, do you think an alternative way as part of the GUI installer would be too much?

Also Fedora doesn't seem to be secure enough when root password isn't set, see the following link.

http://unix.stackexchange.com/questions/184486/a-consistent-and-safe-approach-to-passwordless-accounts-with-ssh

(In reply to Brian Lane from comment #1)
> FWIW you can embed ssh keys in kickstart files:
> 
> https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.
> rst#sshkey

Nice.

Btw... surprised by the docs for the next command...

„Note that by default, root has a blank password. If you don't want any user to be able to ssh in and have full access to your hardware, you must specify sshpw for username root. Also note that if Anaconda fails to parse the kickstart file, it will allow anyone to login as root and have full access to your hardware.“

I've never seen Fedora accepting empty passwords for SSH.

Comment 4 David Shea 2015-10-23 19:02:22 UTC
(In reply to Pavel Šimerda (pavlix) from comment #3) 
> Btw... surprised by the docs for the next command...
> 
> „Note that by default, root has a blank password. If you don't want any user
> to be able to ssh in and have full access to your hardware, you must specify
> sshpw for username root. Also note that if Anaconda fails to parse the
> kickstart file, it will allow anyone to login as root and have full access
> to your hardware.“
> 
> I've never seen Fedora accepting empty passwords for SSH.

The sshpw command is only for the password used to ssh into the installer environment, and sshd in the installer is only activated if you boot with inst.sshd. sshpw does not affect anything in the installed system.

> Anyway, do you think an alternative way as part of the GUI installer would be > too much?

A GUI field would probably be ok. Adding another field to the advanced user dialog is easy enough. For root we'll have to think about where we want to put the input, since that spoke doesn't have as much in it right now.

Comment 5 Pavel Šimerda (pavlix) 2015-10-23 19:34:54 UTC
(In reply to David Shea from comment #4)
> (In reply to Pavel Šimerda (pavlix) from comment #3) 
> > Btw... surprised by the docs for the next command...
> > 
> > „Note that by default, root has a blank password. If you don't want any user
> > to be able to ssh in and have full access to your hardware, you must specify
> > sshpw for username root. Also note that if Anaconda fails to parse the
> > kickstart file, it will allow anyone to login as root and have full access
> > to your hardware.“
> > 
> > I've never seen Fedora accepting empty passwords for SSH.
> 
> The sshpw command is only for the password used to ssh into the installer
> environment, and sshd in the installer is only activated if you boot with
> inst.sshd. sshpw does not affect anything in the installed system.

Does it mean this install-time SSH has specific configuration that allows connecting using an empty password?

> > Anyway, do you think an alternative way as part of the GUI installer would be > too much?
> 
> A GUI field would probably be ok. Adding another field to the advanced user
> dialog is easy enough. For root we'll have to think about where we want to
> put the input, since that spoke doesn't have as much in it right now.

Happy to read this.

Comment 6 David Shea 2015-10-23 21:05:33 UTC
(In reply to Pavel Šimerda (pavlix) from comment #5)
> (In reply to David Shea from comment #4)
> > (In reply to Pavel Šimerda (pavlix) from comment #3) 
> > > Btw... surprised by the docs for the next command...
> > > 
> > > „Note that by default, root has a blank password. If you don't want any user
> > > to be able to ssh in and have full access to your hardware, you must specify
> > > sshpw for username root. Also note that if Anaconda fails to parse the
> > > kickstart file, it will allow anyone to login as root and have full access
> > > to your hardware.“
> > > 
> > > I've never seen Fedora accepting empty passwords for SSH.
> > 
> > The sshpw command is only for the password used to ssh into the installer
> > environment, and sshd in the installer is only activated if you boot with
> > inst.sshd. sshpw does not affect anything in the installed system.
> 
> Does it mean this install-time SSH has specific configuration that allows
> connecting using an empty password?

Yes. https://github.com/rhinstaller/lorax/blob/master/share/config_files/common/sshd_config.anaconda is the config file used by sshd in anaconda, and as mentioned sshd is only turned on if specifically requested.

Comment 7 Jan Kurik 2016-02-24 13:48:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 8 Fedora End Of Life 2017-07-25 19:20:23 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2017-08-08 12:17:15 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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