Skip to content

Using SSH on a Windows operating system

Getting PuTTY and PuTTYgen

Download PuTTY from: .

It's enough to download and install PuTTY, since it comes bundled with PuTTYgen. After installing PuTTY, one can search for PuTTY and PuTTYgen on their computers.

Basic PuTTY usage

Into the slot of ’Host Name (or IP address)’ one must enter the IP address of the machine one is trying to connect to. When the machine in use has a resolvable name in a DNS server available to the world, one can also use the fully qualified domain name (FQDN) instead.

In the adjacent slot one must specify the Port your destination machine is expecting the ssh connection from. In a standard setup that port number is 22.

Accessing a machine with ssh requires one to specify the user name with which one can access the machine. One can automate the insertion of user name by choosing the Data tab in the left menu and specifying the user name one wished to use for the automatic user name insertion. In the following illustration, the username for the ’Auto-login username’ is centos.

In general the machines available from University of Tartu ETAIS interface. The default usernames are the following:

  • Ubuntu-based image's default user is ubuntu
  • Debian-based image's default user is debian
  • CentOS-based image's default user is centos
  • Windows-based image's default user is Admin
  • typically your university (or ETAIS ) username for non-OpenStack machines.

After entering the desired username one can click ’Open’ and connect to the machine.

In order to save said username one can go back to the ’Session’ tab on the left hand side make sure the ’Host Name (or IP address)’ and ’Port’ are correct and then name the session something meaningful in the slot under ’Saved Sessions’ and click ’Save’ on the right hand side. The session parameters are now saved for future use.

When the user later returns to PuTTY one doesn't have to enter the username again in the ’Data’ tab on the left hand side, simply choosing the previously saved session form the list, in the example below that would be ’access to rocket (UT)’, and pressing the ’Load’ button the session parameters get loaded in and by pressing the ’Open’, PuTTY creates a new session to the desired machine with all the parameters already set by the loaded session.

Generating public and private keys with PuTTYgen

Open PuTTYgen and click ’Generate’.

PuTTYgen instructs the user to move their mouse around in the white box to generate the key-pair. After the generation, PuTTYgen displays the pre-selected Public key in OpenSSH format. One should copy previously mentioned selection into a file. Using Notepad to save the public key is fine, the file format isn't important as long as the content of the public key stays intact.

After saving the public key, one must save the private key by clicking on the ’Save private key’ button.

After clicking the ’Save private key’ button one must save choose the location for the private key. Private key is the most important part of the public-private key pair, keeping it secure is of the utmost importance. The private key is with the .ppk file extension that's suitable for PuTTY.

To summarize the creation of public-private key pair, the format of the public key is in accordance to the OpenSSH standard and the private key is in the PuTTY format.

To fully automate the logging into a machine, one must load up a previously created session, go to the ’Auth’ tab on the left hand side and click ’Browse’. Locate the previously saved private key with the ’.ppk’ file format and choose ’Open’.

One should now go back to the ’Session’ tab in the left hand side and click the ’Save’ button again. Now the saved session uses the previously designated username, designated host with correct port and load up the specified private key, granting user access to the desired machine with least effort. Previous sentence does imply that one has appended the OpenSSH format public key to the desired host, usually into ~/.ssh/authorized_keys file, or in the case of ETAIS , one has added the public key under the SSH keys in ETAIS .