How can I access to guest machine via ssh which has Bridged Adapter

14,705

Solution 1

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

me@local:~$ ssh [email protected]

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.

Solution 2

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:
14,705

Related videos on Youtube

Timur Fayzrakhmanov
Author by

Timur Fayzrakhmanov

Updated on September 18, 2022

Comments

  • Timur Fayzrakhmanov
    Timur Fayzrakhmanov over 1 year

    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)

    • ttoine
      ttoine over 10 years
      did you install the ssh server on the virtual machine ?
    • Timur Fayzrakhmanov
      Timur Fayzrakhmanov over 10 years
      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
    Timur Fayzrakhmanov over 10 years
    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
    Timur Fayzrakhmanov over 10 years
    Really helpful answer! Thankee! Unfortunately I cant give you any "vote up", because of low reputation.(
  • Nabil Kadimi
    Nabil Kadimi about 10 years
    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.