I have installed Oracle Virtual Box and RedHat on it. Can I use SSH or PuTTy from my local PC (Windows 7) to access RedHat locally? If yes then what will I enter in field of Host name? And if no then what is best way to connect to it?

  • 1
    If you can ping the IP addr of RHEL from windows, you just need to enter command: ssh username@IPADDR eg. ssh [email protected]
    – TPS
    Commented Sep 1, 2015 at 5:04
  • @Tejas what should be my command like ?
    – Paresh
    Commented Sep 1, 2015 at 5:05
  • If you are in bridge mode then use PuTTY as normal. If you are in NOT bridge mode then use port forwarding in PuTTY and vbox
    – gwillie
    Commented Sep 1, 2015 at 5:06

1 Answer 1


As gwillie said in his comment, connecting to a Virtual Box guest machine depends on the network settings of that virtual machine.

The default settings seem to be NAT which will make the layer between the guest and the host behave like a NAT device (like e.g. a router) and is therefore most suited for situations that don't require access from the host to the guest.

Therefore I usually use Bridged Networking mode which puts the guest on the same network as the host, just like another machine with its own, publicly accessible IP address.

To enable bridged mode, shut down your guest and open its settings, Network, Adapter 1 and change the Attached to dropdown to Bridged Adapter. Then start your guest again and make sure it has a valid IP address on your (host = guest) network.

Assuming your guest IP address is, you can then use ssh to connect to it, like so:

ssh -Y

Note that this will use the same username as the one logged into the host machine, so the easiest configuration is to have the same usernames on the guest as on the host.

As Tejas pointed out, you can also use the ssh user@ip syntax to connect as a different user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .