I’m trying to learn how to work with remote machines in linux, so I have built two ubuntu virtual machines on my PC using virtual desktop. However, I am not able to login to one machine from the other. Each virtual machine can ping the other and get a response. I also have ssh installed on both machines. When I try to login to a machine remotly, using
ssh hostname@IPAdress, I get the following error:
Permission denied, please try again
After researching the problem by looking at a number of similar posts I can see that lots of people recommend changing various settings in the
sshd_config file. So far, I have made the following changes:
PermitRootLogin yes Password Authentication yes
After running the
sudo service ssh restart command, I still get the same result.
Someone in another post suggested looking at the auth.log file. At present, the only things getting logged when I try to login are:
pam_unix(sudo:session): session opened for user by (uid=o) pam_unix(sudo:session): session closed for user root
I’m very new to Linux, but as I understand it I am trying to login remotely to my remote user account (I only have one account, so I’m pretty sure this must be the remote user account). On my machine, you do not have to enter a password to login as this user when you first turn the machine on. But if you log out you have to enter the password to log back in. That’s the password I’m using.
Any help would be greatly appreciated!
I’ve solved the issue now. I was using the hostname, rather than the username to try to login.