Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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)

share|improve this question
    
did you install the ssh server on the virtual machine ? –  ttoine Jan 5 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 at 9:31
add comment

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
    
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 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 at 15:04
add comment

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.

share|improve this answer
    
Really helpful answer! Thankee! Unfortunately I cant give you any "vote up", because of low reputation.( –  Timur Fayzrakhmanov Jan 6 at 9:22
add comment

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.