Abotu setting 'PermitRootLogin=no' in sshd_config

Richard W.M. Jones rjones at redhat.com
Fri Nov 21 20:09:24 UTC 2014


On Fri, Nov 21, 2014 at 09:11:51AM +0100, Florian Weimer wrote:
> On 11/21/2014 09:04 AM, P J P wrote:
> >>My point is that once we address this (most likely through some
> >>configuration generation during VM setup), we can also switch
> >>PermitRootLogin on.
> 
> >   You mean off? Or that we disable it by default and enable it while setting up a new VM?
> 
> The latter.  We have to install authorized_keys inside the VM
> anyway, so we can touch sshd_config, too.

Virt-builder has a new '--ssh-inject' feature (in F22 only).

  $ virt-builder fedora-20 --ssh-inject root

would inject your current ssh key into the root account of the new VM.
There are other variations, including ways to create a non-root user
account, see:

http://libguestfs.org/virt-builder.1.html

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org


More information about the devel mailing list