Setting local Ubuntu VirtualBox VM to accept Putty connection

Setting local Ubuntu VirtualBox VM t0 accept Putty connection. In this tutorial you will learn how to setup your local virtual machine (Virtualbox) so you can use putty to connect to your vitualbox.
Turn off your virtual machine.
On Virtualbox goto
Settings >> Network >> Adapter 1 (tab) >> Attached to:
Select : Bridge Adapter
Click Ok and run your Virtual Machine



On the Console, enter the command below to check your IP address:
ip addr show

#if you can see your local network address on the showed list, that’s a good sign
Change your IP Address:
sudo nano /etc/network/interfaces
Comment this line by adding # in the begining:
#iface eth0 inet dhcp
The following steps should be based on your network address. In this tutorial I will use my Network Address. My network maybe different from yours. If you have no idea about this, you may study a little about setting up network address.
Add the following lines
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
To save, press ctrl+o and exit ctrl+x
Reboot your VM:
reboot
Check your IP if it applied the setting we did:
ip addr show
If the IP is correct, start installing the SSH to your VM
sudo apt-get install openssh-server
You should be able to use Putty to connect to your Virtual Machine. Run your Putty and enter the following details:
  • Host Name: 192.168.1.101
  • Saved Sessions: MyDemoVM (any name)
  • Click Save and click Open

If you want to setup your Putty to login automatically, you should setup the SSH on your Virtual Machine. To do that, you may wish to read the following article:
SET SSH PUBLIC KEY AUTHENTICATION

0 comments:

Copyright © 2012 My Linux Code