lost and found ( for me ? )

Ubuntu 16.04 uvt-kvm small tips : enable password authentication over SSH with root user

When creating a VM with uvt-kvm tool, the VM does not allow password authentication over SSH.
$ uvt-kvm create test01

$ uvt-kvm ip test01

$ ssh -l root
Please login as the user "ubuntu" rather than the user "root".

Here is how to enable password authentication with root user.

Prepare cloud-init file..
$ cat user-data
ssh_pwauth: yes
 list: |
 expire: False
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- systemctl restart sshd

create a VM
$ uvt-kvm create --user-data=./user-data test02

$ ssh -l root `uvt-kvm ip test02`
root@'s password:
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-89-generic x86_64)


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.