0

I have Ubuntu Server 18 installed on a virtualbox instance. I want to be able to SSH into it from the desktop computer that it's currently installed on and running on as well as from my laptop. Would like to be able to remote into it from work on my laptop, as i plan to use the virtual machine as a web server to run my blog.

As of now, when i run ip addr in my Ubuntu Server VM, it's giving me a 192.168.0.x ip address.

I open up a command prompt window in Windows and type: ssh 192.168.0.x

Output is: [email protected]'s password:

I have no idea why that is the output. Why would my windows machine's local username be there..the virtual machine is an entirely separate IP when using Bridged Network Adapter in the VM options isn't it? So that's pretty strange.

So, i try typing in the password that i've set for root in the Ubuntu Server VM and the output is:

Permission denied, please try again.

This is my first time using SSH for this purpose, can anyone clarify what i am doing wrong here? Thanks.

1 Answer 1

0

The default user for a SSH connection is the local user. It's the same on Unix. How should the SSH client know what user you want if it is different from the current user?

You won't be able to login as windowsmachinelocalusername, because the Linux machine doesn't know that user, and therefor doesn't accept any password for that user.

If you want to login as root, use the command

ssh [email protected]
2
  • Thanks for the answer. This did not end up working for me, but, connecting through PuTTY did work for me.:)
    – Sebian
    Commented Dec 10, 2018 at 1:55
  • 1
    @SpencerL putty (great tool) is different from ssh in that it prompts for a username (unless part of site config). As this answer states, plain ssh will take whatever local user it is being called as if no user is otherwise provided. On a *nix system (OS X included) you can create shortcuts to various servers with various options in ~/.ssh/config. These options can include a username and even a auth key file reference.
    – ivanivan
    Commented Dec 10, 2018 at 3:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .