Im using ubuntu and Im trying to create a ssh connection between my ubuntu desktop and virtualbox ubuntu instance.
I have my ubuntu virtualbox instante configured with bridge, and in my ubuntu desktop Im trying to connect to my virtualbox instance like this: sudo ssh nameofvminstance
I enter the correct password of my vbox instance, but Im having always the same message: "Permission denied, please try again".
Do you see why this can be happening?
Best Answer
Remove
sudo
, just do:then enter the password.
If you do
sudo ssh nameofvminstance
, then you are basically trying to log in to the hostnameofvminstance
asroot
, if thats the case then at first you need to enter the password of your account in the host computer to get thesudo
access and then the password of theroot
account ofnameofvminstance
.Now if you do
ssh nameofvminstance
, its basically a short form ofssh username@nameofvminstance
where the username in the remote computer is the same as the currently logged in user of the host machine i.e. you can use this format if both usernames are same otherwise you need to mention the username asssh username@nameofvminstance
.