I have RHEL running in Virtual Box and my native OS is Win 7. From a purely educational standpoint, I want to be able to access RHEL from Win 7 over SSH. I download putty but don;t know how to make it do what I want. Ideally, I would like to use the linux command prompt at a minimum and preferably access the GUI apps also. IS this possible? I am just trying to explore and expand my linux knowledge.

Thanks for your time. Gary Hunter

link|improve this question
feedback

7 Answers

Gary,

I'm not sure you got your answer yet...so here goes :-)

You're running Windows 7 as HOST and RHEL as the GUEST operating system. I'm going to assume that your VirtualBox network configuration for RHEL is NAT'd (instead of bridged). This means that you're going to need to use the following command to do port-forward (port 22) from the HOST to the GUEST. From your windows command prompt enter the following command:

VBoxManage modifyvm "vopa" --natpf1 "guestssh,tcp,,22,,22"

Port 22 is the default port used by ssh or putty. Since Windows 7 doesn't use this port the command will forward all network traffic over this port from the HOST to the GUEST. Now from a command prompt on your windows system you can use the following putty command to logon to your RHEL (GUEST) system from your windows system (HOST).

putty userid@localhost

Where 'userid' is the linux user account on your RHEL system. For example if your userid was the root account you would type the following:

putty root@localhost

You will be prompted for the password. Hope that helps :-) --Slick

link|improve this answer
BTW, make certain your RHEL system has the Firewall disabled and SELinux disabled. You won't need to install an X-Server (like xming) but if you do have cygwin installed you can use the ssh command instead of putty. – Slick Dec 29 '10 at 21:58
Instead of "vopa" specify the name of your RHEL virtual machine. The name that appears in the VirtualBox list when you start the RHEL system. – Slick Dec 29 '10 at 22:02
VirtualBox comes with an RDP server though, you could just RemoteDesktop into your RHEL, no need for an X11 server (but if you want one, Xming works great) – nos Mar 4 '11 at 0:33
feedback

This post I found shows how to configure ssh between a guest and host. Although it deals with a Linux host, the main steps deal with configuring the Linux guest.

link|improve this answer
feedback

You'll need cygwin on Windows if you want to forward X11 from your RH VM to Windows.

Alternatively just run '$ startx' and you'll get to the GUI part of the linux install.

link|improve this answer
Thanks. I prefer to go without cygwin though. – Gary Hunter Nov 11 '10 at 6:01
Gary, understood. Preference is your choice. Cygwin is the 'natural'/most-popular, albeit you can also go with Xming – RomanT Nov 12 '10 at 11:25
feedback

For the GUI bit you could try the Xming server.

There is a similar question for a FC guest here,
SSH from host machine Win7 to guest Fedora Machine in VirtualBox

link|improve this answer
feedback

If your purpose is to mainly move files around. I would suggest using something like WinSCP or FileZilla

link|improve this answer
feedback

You might be able to use OpenSSH though Cygwin for this. I haven't got the necessary things to try it out with your use-case, but I think it should be doable.

link|improve this answer
Oh! I didn't notice that @RomanT had already posted this answer. – Leif Nov 11 '10 at 17:09
feedback

The way that I do this is to attach the guest's network adapter to the bridged adapter. What this means is that the guest will obtain an IP address from the same DHCP server that the host obtained its IP address from.

First follow these instructions to attach the guest network adapter to the bridged adapter. You can even do this while the VM is running:

  1. Right click on the network icon in the status bar of the VM window: Screenshot of a VirtualBox VM window after the network icon was right-clicked
  2. Select "Network Adapters..."
  3. In the dialog, select "Bridged Adapter" from the "Attached to:" combo box: Screenshot of the VirtualBox network settings dialog
  4. Click "OK".

You will then need to have RHEL renew its IP address loan. In a terminal, type:

sudo dhclient -r
sudo dhclient

The guest's new IP address is viewable in the output of ifconfig eth0:

Screenshot of the output of ifconfig eth0

In my case, it's 192.168.1.100. I can now ssh into that IP with Putty.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.