2

I have an Ubuntu virtual machine to which I can ping perfectly from my host.

I created a root password and I can use it normally too. I also changed the ssh-conf file such that root login is permitted as below and the guest OS is re-started multiple times in the mean while:

PermitRootLogin yes

But even then I cannot cannot to it via "plink" (putty link) from the host machine. I tried simple ssh even that does not work. Note that plink I started in a dos window but ssh I tried using cygwin.

ssh root@10.122.1.100
root@10.122.1.100's password:
Permission denied, please try again.
root@10.122.1.100's password:
Permission denied, please try again.
root@10.122.1.100's password:
Permission denied (publickey,password).

And the /var/log/auth.log indicates the following ...

Jan 20 18:24:31 osboxes sshd[2735]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=<HOST>  user=root
Jan 20 18:24:34 osboxes sshd[2735]: Failed password for root from 10.122.0.55 port 51989 ssh2
Jan 20 18:34:49 osboxes sshd[2749]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=<HOST>  user=root
Jan 20 18:34:51 osboxes sshd[2749]: Failed password for root from 10.122.0.55 port 52256 ssh2
Jan 20 18:35:02 osboxes sshd[2749]: message repeated 2 times: [ Failed password for root from 10.122.0.55 port 52256 ssh2]
Jan 20 18:35:02 osboxes sshd[2749]: Connection closed by 10.122.0.55 [preauth]
Jan 20 18:35:02 osboxes sshd[2749]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=<HOST>  user=root

I replaced the host address with in the above log for this post.

Does any of you know what am I still missing ?

Many thanks,

Prakash

  • Is the VM running inside VirtualBox / VMware with "NAT" style networking, or is it connected direct to the network through a Bridged interface or similar? – Thomas Ward Jan 20 '16 at 17:44
  • May be I am noob or we are missing something , why port showing ` in Failed password for root from 10.122.0.55 port 51989 ssh2 ` as port 51989 ? – rɑːdʒɑ Jan 20 '16 at 17:49
  • 1
    how did you create root password? – Jakuje Jan 20 '16 at 19:01
  • @raja this is remote port, not local from the sshd point of view. This is the port where the client bind(), not the server listen()ing. – Jakuje Jan 20 '16 at 19:04
  • 1
    Possible duplicate of How to enable ssh root access on Ubuntu 14.04 (see this answer) – bain Jan 20 '16 at 22:25
1

Thank your for your answers.

The answer is indeed simple because I seem to have edited ssh-config file instead of sshd-config to enable root login. And after editing the file it seems to solve the issue.

Many thanks for your time

Prakash

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.