Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Virtual Machine running Linux. Is there any way for me to connect to a terminal on the VM OS from the host? For instance, AWS allows you to just ssh into virtualized OSes. How could I virtualize an OS and then connect to it, say, via SSH?

My question is a little vague, because I'm not very familiar to this. Pointers to software (Xen, vbox?) / tutorials / papers much appreciated

Edit: say it was Linux for guest and host OS.

share|improve this question
    
What is your host OS? Are you asking simply how to SSH into a Linux guest? –  JoshP Jul 30 '12 at 16:01
    
Ok, theoretically, say I had a Linux host and Linux guest OS. –  kalaracey Jul 30 '12 at 16:29

2 Answers 2

If you are using VirtualBox using the defalt VBoxManage GUI, then, by default, it create a window showing the console of the machine when you start it. If you are running the VM in the background (VBoxHeadless) then you can enable the remote desktop option and connect to the VM using rdesktop.

If you are uisng another VM hosting program, then you'd need to check the documentation, but I suspect all will have a similar feature.

As mentioned, if the VM is running sshd or equivalent, then you should be able to use ssh to login to it from the host (or elsewhere, depending on the network connection).

share|improve this answer

From a terminal on the host machine, type:

ssh user@x.x.x.x <-- your guest's IP

You'll be asked about a key, type:

yes

You'll be asked for your password. Enter the password for the user you're logging in as.

If your guest is listening on a non-standard port, the first command differs slightly...

ssh -p [port number] user@x.x.x.x

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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