Problem: Many times administrators will find themselves on a Windows machine with no way to access a remote server securely since Microsoft does not yet package an SSH client.
There are a number of excellent tools available that provide SSH client connectivity from a Windows platform. A list of these tools is available at http://www.openSSH.com/windows.html.
Note |
It is possible to use Cygwin, a UNIX environment for Windows, to compile OpenSSH and run an OpenSSH server daemon. However, installing and configuring Cygwin is beyond the scope of this book and will not be discussed. Cygwin can be found at http://sources.redhat.com/cygwin/. |
PuTTY is an open source Windows SSH and telnet client, distributed under the MIT license and maintained by Simon Tatham. The package contains all of the necessary components required to connect to a machine running the OpenSSH server and runs on all versions of Windows, starting at Windows 95.
PuTTY contains a number of components that are described below.
Each of these components can function separately, although the purpose of some is to complement what the others do. For example, Pageant is used to provide automatic authentication for PuTTY, PSCP and PSFTP.
To install PuTTY onto your Windows machine, the following steps need to be taken:
Choose which items you want the installation to complete and click Next . If you are not sure which items should be created, leave them all checked and click Next .
Since most of PuTTY's components are command line based, it may be helpful to have them in your Windows PATH so you can execute them while at the Windows command prompt. This is done differently in each version of Windows.
For Windows XP:
;C:program filesputty
where c:program filesputty is the default directory in which the PuTTY programs are installed.
To check your PATH go back to the Start Menu and click on Run . Type in cmd and Click OK .
A Windows command prompt should appear. Type "PuTTY". If your path has been set correctly, the PuTTY configuration box should appear.
To change the PATH from a Windows command prompt: the path can be set as shown below:
C:> set PATH=%PATH%;c:program filesputty
where c:program filesputty is the default directory the PuTTY programs are installed. If typed on the Windows command prompt in this manner, the command must be repeated for each new command window opened; it will not be saved for future command windows.
The file transfer tools that come with PuTTY are command line based, which can make it difficult in a Windows environment to quickly and easily transfer files. However, there are a number of graphical SSH file transfer tools referenced at http://www.openSSH.com/ windows .html. One such tool is WinSCP.
WinSCP is a freeware scp-like client maintained by Martin Prikryl and is located at http://winscp.vse.cz/eng. It provides a Windows Explorer- or Norton Commander-type drag-and-drop interface for transferring files securely and easily from one computer to the next , using SSH.
WinSCP application “ This is the main application. You want to install this.
PuTTYgen “ This is the key generator from PuTTY that WinSCP uses. Even if you already have PuTTYgen installed, you probably want to install this as it may be a different version than what you already have installed.
Pageant “ This is the SSH authentication agent from PuTTY that WinSCP uses. Like PuTTYgen, you probably want to install this as well.
Once you have selected the components to install, click Next .
Create a desktop icon ” This will create an icon for WinSCP on the desktop.
Create a Quick Launch icon ” This will put an icon in your quick launch menu along your Taskbar.
Add upload shortcut to Explorer's ˜Send to context menu “ This will allow you to right click on a file within Windows Explorer and begin an upload.
Choose the tasks you prefer and then click Next .
User Interface style “ You are given the choice between a Norton Commander or Windows Explorer-style interface. The Norton Commander style will show the local and remote system in two windows side-by-side while the Window Explorer style will display the remote folder as a window by itself.
Show advanced login options ” This will show the advanced options you are able to set when the WinSCP initial login screen appears.
Choose the interface settings you prefer and click Next .
If WinSCP is installed correctly, the WinSCP login screen shown below should display.
SECTION I - Obtaining, Compiling and Installing OpenSSH
SECTION II - How to Use OpenSSH Clients for Unix-to-Unix Connectivity
SECTION III - How To Use PuTTY/WinSCP For PC-To-Unix Connectivity
SECTION IV - Using Public Key Authentication
SECTION V - Troubleshooting SSH Connections
SECTION VI - Advanced SSH Topics
Conclusion
Appendix - Sample sshd_config File