How do I setup ssh on Windows?
 

How do I setup ssh on Windows?

SSH and Windows

If you do not have an ssh client, you need to install one. Putty is the prefered client. You can download the Windows installer from the putty web site (more convenient than install each piece of software one by one). If you do not have sufficient privileges to install it, ask your system administrator to install it for you.

 

Create your ssh key

Run the puttygen.exe utility to generate a pair of private/public keys.

Make sure the SSH-2 RSA parameter is selected at the bottom of the window and click on the Generate button.

Once you have accumulated enough entropy, the application generates the key.

Make sure you enter a lengthy passphrase in the Key passphrase field and confirm it in the Confirm passphrase field.

Click on the Save private key button to save your private key in a file.

With your mouse, select the content of the box labeled Public key for pasting into OpenSSH authorized_keys file, copy it (that is, hit Control-C).

 

Make it available for PuTTY-compliant applications

  1. Under Session , enter the hostname of the Unix machine, and choose the SSH protocol
  2. Under Connection > Data , enter your login name for the Unix machine in Auto-login username
  3. Under Connection > SSH > Auth , select the filename of the private key that you saved out of PuTTYGen
  4. Back under Session , enter the hostname again in the box under Saved Sessions and click Save
This is now added into the registry and all PuTTY applications are aware of it.

 

Update your gforge account

Paste your public key in the gforge website. To do this, you need to go to your account and then go to the Account maintainance tab. At the bottom of the Account maintainance tab, you should see a Shell Account Information section which contains an [Edit keys] link. Paste (that is, hit control-V) your public key(s) in the empty field below and click the Update button.

Warning!

A common problem is that the Shell Account Information field does not appear in your account page. This usually happens because you do not belong to any gforge project. To correct this problem, either create your own project first or request the project admin of the project you want to join to add you to the list of the project's contributors.

Please, be aware that uploading your ssh public key on the server will not allow you to connect to the server immediately through ssh. To do so, you will need to wait at most 24h. If your connection is impossible 24h later, please, contact the server administrators.

 

Load your key

pageant is a utility that loads ssh keys in memory. If you load your ssh key with pageant, you won't have to type your ssh key passphrase again and again.

First, run pageant.exe. Then load your ssh key by right-clicking on the pageant icon in the system tray bar as shown below.

Click on the Add key menu item: a file dialog pops up.

Select the private key file you saved while running puttygen.exe and click on the Open button: a new dialog pops up. Its title is Pageant: enter passphrase.

Type in your passphrase and click on the ok button.

Your key is now loaded in pageant.

 

You can now access your UNIX shell account located on the gforge.inria.fr server or use your source code management (scm) repository. Detailed instructions on how to access your SCM with the tortoise graphical user interface on windows are available here.

Make it work with command line svn

You can tell the command line subversion client to use putty for ssh connections by exporting the environment variable SVN_SSH to point to the full path of plink.exe (included in putty). For example:

setx SVN_SSH "C:/Program Files (x86)/PuTTY/plink.exe"

You have to open a new shell before using the svn command line so that the new environement variable is used.

 

In case of problems, mail the administrators or file a bug.

Powered By GForge Collaborative Development Environment