Create an SSH session from the command line using PuTTY

written by: Allan Servedio; article published: year 2007, month 03;


In: Root » Computers and technology » Linux » Create an SSH session from the command line using PuTTY

Dutch French Spanish Portuguese Italian German Japanese Chinese Korean Russian Arabic Bookmark and Share this Article

There are multiple ways to create an SSH session from the command line using PuTTY.

The first way involves using the PuTTY program itself. PuTTY comes with a number of options that can be used to invoke the graphical PuTTY terminal from the command line. A description of these options is available within the PuTTY help file. To run PuTTY from the command line:

Note 

For any command line PuTTY program to work, the Windows PATH environment variable must be set to include the path to the directory in which the PuTTY programs are installed.

  • Click on the Start Menu and select Run. In the field provided, type in cmd if you are running Windows NT/2000/XP or command if you are running Windows 9x/ME and click on the OK button. This will give you a Windows command prompt.

  • From the command prompt, invoke PuTTY using the following syntax:

        putty -ssh [-l user] [user@]hostname  

    Where:

    • user = the account you are trying to access on the remote machine.

    • hostname = the hostname or IP address of the machine you are trying to contact.

    PuTTY also allows you to open a saved session from the command line. To do this, use one of the following arguments at the command line:

        putty -load "session name"        putty @"session name"  

    Where:

    • session name = the name of the saved session. (If the session name contains spaces, it should be surrounded by quotes.

For example, if you want to start PuTTY with a connection to server.example.com as user sshuser, type the following at the Windows command prompt and press Enter:

        C:\>putty -ssh -l sshuser server.example.com  

To start PuTTY with a saved session called "ssh server", type the following at the Windows command prompt and press Enter:

        C:\>putty -load "ssh server"  

After authenticating successfully, you will have a shell prompt on the remote machine.

Disclaimer

1) E-articles is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringement, please read the terms of service and contact us to investigate the problem.
2) E-articles is not responsible for inaccuracies, falsehoods, or any other types of misinformation this article may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here.

link to this article