Bug 1268819 - allow SSH public key configuration as an alternative to password
allow SSH public key configuration as an alternative to password
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-05 07:36 EDT by Pavel Šimerda (pavlix)
Modified: 2017-08-08 08:17 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 08:17:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pavel Šimerda (pavlix) 2015-10-05 07:36:48 EDT
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 14:57:44 EDT
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 13:55:29 EDT
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 14:54:27 EDT
(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 15:02:22 EDT
(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 15:34:54 EDT
(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 17:05:33 EDT
(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 08:48:49 EST
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 15:20:23 EDT
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 08:17:15 EDT
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.