how to ssh to root of my virtual machine unbuntu 14.04

100 views Asked by At

My host is mac and I create ubuntu 14.04 using VirtualBox.I am trying to ssh to its root account having set a password for root. when I execute ssh -vvv root@ip and input my password. Following is debug infomation:

debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
how can I connect my virual machine?

1

There are 1 answers

0
Iñigo González On

The SSH daemon does not allow root logins by default.

You must just add this line to your /etc/sshd_config file:

PermitRootLogin yes

Be careful! ssh to root does not log what's happening. It is better to have a user with sudo permissions. This gets logged for later investigation.