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: windowsmachinelocalusername@192.168.0.x'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.

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 root@192.168.0.x
| improve this answer | |
  • Thanks for the answer. This did not end up working for me, but, connecting through PuTTY did work for me.:) – Spencer Livingston Dec 10 '18 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 Dec 10 '18 at 3:36

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.