Windows guy learns linux How to telnet/ssh

So far I have used the VirtualBox console to connect to my virtual machine running Linux (CentOS 7).  This is fine and good for one session, but if you want to run multiple terminals you have to install a Telnet/SSH client.

I will be using a client called “Putty” which is free and very widely used.  Download Putty.exe to your desktop.

Now we have Putty now but it’s useless until we make some changes on our local virtual machine.  (If you’ve installed Linux on a real physical machine or had Linux installed on a server VM then this next steps might not apply)

We need to know which IP address our Linux server is running on.  In your VM console run “#ifconfig”.  This is very similar to running ipconfig on Windows command line.  My results are below.

Linux IFConfig

Note, the IP address of the virtual machine is  Now that we know that we go to VirtualBox, select the VM in question and click on Settings and then select “Network”.

Expand the “Advanced” tab if it is not already showing and click on “Port Forwarding”.

Virtual Box Linux SSH Port Setup

Here, click the +Plus sign and add a new rule.  It can be called whatever, I called mine SSH.  Add the line as shown.  If you have a different VM IP than then you will want to use that.

Virtual Box Linux SSH Port Forward Setup

At this point you can run that Putty.exe that you downloaded earlier.  Enter as your IP address and click “Open”.

Putty SSH Linux VirtualBox

At this point you should get a “login as:” prompt.  Enter your username and password and you should be connected.

Putty CentOS 7 VirtualBox

Now you can open up multiple terminal windows and run multiple programs at once.

If your terminal keeps timing out too early for you, you can change it so that it “stays alive” for a much longer time by doing something like this.

Open the sshd_config file.

# nano /etc/ssh/sshd_config

Add/change the following lines

ClientAliveInterval 30
TCPKeepAlive yes 
ClientAliveCountMax 99999

3/2/2015 Edit: Despite my changes, my terminal sessions were still getting disconnected.  For me the problem was with VirtualBox.  I had to download the beta version (4.3.23 r98674).  Then I could not launch any VMs because I would get a STATUS_OBJECT_NAME_NOT_FOUND error having to do with \Device\VBoxDrvStub.  I then uninstalled Windows Update KB3004394 and then reinstalled VirtualBox.  Now things seem better.  Hope that anybody having this problem finds this update helpful.

3 thoughts on “Windows guy learns linux How to telnet/ssh”

  1. Wonderful website you have here but I was wondering if you knew of any user discussion forums that cover the same topics discussed in this
    article? I’d really love to be a part of online community where I can get
    responses from other knowledgeable people that share the
    same interest. If you have any recommendations, please let me know.

  2. Thank you for every other informative web site. The place else could I get that kind of information written in such an ideal method?
    I have a challenge that I am just now working
    on, and I have been on the glance out for such information.

Leave a Reply

Your email address will not be published. Required fields are marked *

− one = 8

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>