Using Temporary Public Key Authentication with OpenSSH (command line)

Notes:

 

·        This only works with OpenSSH clients at the present time.  There is an issue with key formats for other clients.  (Can also be made to work with PuTTY if you use PuTTYgen to convert the keys into PuTTY’s format)

·        OpenSSH is available for Linux, Mac OS X and Windows using Cygwin.

·        There have also been issues with some browsers.  Mozilla 1.2.1 under Linux seems to fail when downloading the keys (the file is 0 bytes).

·        The key pair is only valid for 8 hours.  After this time you will have to generate a new set.  This will not close existing connections.

 

Steps:

 

1.  Open a command prompt on your local machine:

 

2.  At the prompt, type:

           

            ssh research.rutgers.edu /usr/local/bin/regen.pl > <filename>.zip

 

            (ie. ssh research.rutgers.edu /usr/local/bin/regen.pl > keys.zip)

 

You will be prompted for a password for the initial login.  Subsequent logins will utilize the existing “trust” relationship to generate a new set of keys. 

 

NOTE: You should not have to type a password after the initial login as long as you generate a new key pair before the current pair expires.

 

3.  At the prompt, type:

 

            unzip <path-to-zip-file>                         (ie. unzip keys.zip)

 

You should now have a directory called mkrussh in your current directory.   In this directory are 2 files, id_rsa (private key) and id_rsa.pub (public key).  These need to be put in the appropriate location.   For OpenSSH (assuming the existence of the .ssh directory in your home directory):

 

 

4. ssh to research.rutgers.edu.  There is no passphrase on the keys generated, so you should be logged in automatically.

 

Email help@research.rutgers.edu if you have any questions or problems.