I'm sorry for the mistakes I've made, I'm not Englishman.

I have Ubuntu 13.10 and Virtualbox installed Ubuntu Server 13.10 (Bridged Adapter). Guest machine has nginx, mariaDB, php etc. - hence web server. So at the host machine I successfully connect to vm server through browser and everything works ok. Now I want to set up ssh connection between guest and host. How can I implement it?

I think something tie with port forwarding and network type on guest, but I don't have enough knowledge to understand what I do wrong. Googling direct me to host-only network type on guest machine and configuring its IP to static instead of DHCP. Please, help)

  • did you install the ssh server on the virtual machine ? – ttoine Jan 5 '14 at 21:31
  • Unless it is not installed by default? I have found out that sshd and ssh configuration files at /etc/ssh/ are already presented.. – Timur Fayzrakhmanov Jan 6 '14 at 9:31

Assuming the SSH server is running and configured correctly, you can connect without any problems:

me@local:~$ ssh remoteuser@192.168.1.X

Now to make things easier, you should use a static IP address for the guest machine, this way you won't have to use ifconfig to find your IP address every time you connect to a different network.

  • Hm..it works! Thank you. So how can I connect vice versa, hence from guest to host? I tried the same way, but it doesn't work( – Timur Fayzrakhmanov Jan 6 '14 at 9:14
  • 1
    Sorry for the late reply, but there are many reason the reverse connection could fail, maybe you don't have the SSH server daemon running on the host...What error message do you have?...I think it's better to create (ask) a new question. – Nabil Kadimi Mar 4 '14 at 15:04

Connect to the IP address that the Ubuntu Server 13.10 has on your network.
On your server run $ifconfig eth0 this should give you the IP that the virtual network adapter is pulling from your network.

When you have the adapter in bridged mode it is going to act like a separate NIC so no port forwarding is necessary. It would be more complicated if you had it running in NAT mode.

  • Really helpful answer! Thankee! Unfortunately I cant give you any "vote up", because of low reputation.( – Timur Fayzrakhmanov Jan 6 '14 at 9:22

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.