SSH is a network tool used for remote, command-line login to systems that have the server enabled. It has sibling applications named SFTP and SCP that can be used to copy files.
Microsoft Windows systems have an implementation of OpenSSH that's enabled by default.
Note: This web page assumes the user is an experienced user of SSH on other types of systems, and already knows the basics about key pairs, "known_hosts" files, and so on. It also does not discuss "helper" topics such as "ssh-agent".
The easiest way to determine if OpenSSH is installed is to open a command window (go to the Start Menu, look under "Windows System", and pick "Command Prompt"). Type "ssh" and you should see something like this:
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy]
If it returns the message "'ssh' is not recognized as an internal or external command, operable program or batch file," then it may need to be installed using these instructions:
Once it's installed, using it is as simple as typing something such as:
> ssh username@linux.sens.buffalo.edu
Where username is usually your UBITName.
To copy files using Secure FTP:
> sftp *.doc username@linux.sens.buffalo.edu
To copy files using Secure Copy, preserving original timestamps:
> scp -p *.doc username@linux.sens.buffalo.edu
If you are a Unix/Linux user, remember that wildcards characters such as " * " behave differently in the Windows command shell (in Linux, filename expansion is handled by the shell, whereas in Windows the applications are responsible for it).
Windows stores your public and private keys, along with the "known_hosts" file, in a folder named "C:\Users\username\.ssh", similar to the "~/.ssh" directory on Unix systems. In fact, the files have the same name and format, so if you already have those files on a Unix/Linux system you can just copy them to the corresponding Windows folder.
If you need to create these keys, open a Windows Command Prompt window, navigate to "C:\Users\username\.ssh", and type these commands:
> ssh-keygen -b 2048 -t rsa
> ssh-keygen -b 1024 -t dsa
Hit return whenever prompted to accept the defaults.
As with the Linux versions, the private keys need special permissions set so that only the user can read them. To do this:
Do not do this for the " *.pub " files or other files in that folder.