Virtualbox SSH between host and guest

Virtualbox SSH

Here I am running a virtual box inside my windows machine, and I have installed Ubuntu in my virtual box

Step 1. Start your  virtual box Ubuntu and get the guest ip, (You can use ifconfig command to get the details)

fig 1: (inside virtual box Ubuntu terminal)

configsshinvirtualboxlinuxwithnat1

step 2. shutdown/turn off the virtual box Ubuntu and get the virtual machine properties

go to Network

select NAT

expand Adanced

Click on Port Forwarding button

In the port forwarding rules click add (right top + button)

For the role name you can give any name

Protocal : TCP

Host IP : 127.0.1.1

Host port : 22

Gust IP : <give your virtual box ip address taken from step 1 >

press ok and finish

configsshinvirtualboxlinuxwithnat  3. Start your virtual machine and connect to vm Ubuntu using ssh

open your ssh supporting software (Here i am using git bash)

and give your user password

configsshinvirtualboxlinuxwithnat3

Now you will be able to access your gust machine

 

Note:- You should install ssh server in vb os

eg

 

4 Likes
Author: bm on November 29, 2016
Category: Virtualbox
Tags: ,

Your comment:

Your Name

Comment:




Last articles