User Tools

Site Tools


pub:publickeysetup

Setting Up A Public Key Authentication Using Linux or OS X with SSH

1. Generate a key by typing the following command into the command line:

ssh-keygen -t rsa



2. A prompt will appear expecting you to provide a filename (where your key is saved) and passphrase (to protect your key). For the purposes of this system you can simply hit enter on both of these prompts in order to use the default file location and no passphrase. Your private key should now be generated and stored off the .ssh directory (with a name such as id_rsa). Your public key will also be generated and have the same filename and storage location, but will have a .pub extension (such as ~/.ssh/id_rsa.pub).



3. Using your University email, send your public key file ONLY, (do not send us your private key) to it-research-support@mst.edu and allow some time for an administrator to copy your public key for remote access. You will receive email confirmation when you are authorized.

4. You now should be able to SSH to your account on the remote system (i.e. username@foundry.mst.edu) from the computer (such as host1) that has your private key (~/.ssh/id_rsa) by using the following command:

[username@host1 ~]$ ssh username@foundry.mst.edu

If you didn't save this file to a default location then you will have to tell ssh what key file you would like to use with the -i switch.

[username@host1 ~]$ ssh username@foundry.mst.edu -i /path/to/your/private/key/file

Setting Up A Public Key Authentication Using Windows with Putty

1. Install needed PuTTY packages using the linked executable.

2. Open the PuTTYgen key generation utility (NOTE: This is a separate program from PuTTY).



3. Under Parameters, select SSH-2 RSA. Set the number of bits generated in key to either 2048 or 4096 (4096 is preferred). Note: Newer versions of PuTTYgen do not have the SSH2-RSA option, instead select the RSA option.



4. Under Actions, click Generate. When prompted use your pointing device (mouse, trackpad, trackball, etc.) to move your cursor around the blank area under Key (this generates randomness the utility uses to create your key pair).



The program will display your generated public key under Key whenever it has completed generation.

5. Under Actions, click Save public key.

6. Give your file a name (such as putty_key) and select a location to store it on your computer before hitting Save. Make sure this is a location you can easily find again, your user's home folder is a good place.

7. Under Actions, click Save private key.

8. Make Save as type set to PuTTY Private Key Files (*.ppk), give the file a name (such as putty_private_key), and select a location to store it on your computer before hitting Save. Make sure this is a location you can easily find again, your user's home folder is a good place. It is advisable to set a passphrase to protect this file since all your encryption will be done with this file.



9. Using your University email, send your public key file ONLY, (do not send us your private key) to it-research-support@mst.edu and allow some time for an administrator to copy your public key for remote access. You will receive email confirmation when you are authorized.



10. In the Putty Session window, type in joeminer@foundry.mst.edu in the box under Host Name (or IP address). Replace “joeminer” with your SSO ID, but do not type “UM-AD\”.



11. In the sidebar, click on the SSH drop down arrow. Then click on Auth. Under Private key file for authentication: click Browse then select your private key file which you saved previously.



12. Return to Session by using the sidebar, and in the box under Saved Sessions type in a name (ex: Foundry). Press the Save button to the right of the list of saved sessions.



13. Now each time you would like to access the cluster, select your saved session (Foundry in the example above) then select the Load button to the right of the list of saved sessions.



14. Press the Open button. You should now be connected to your account on the remote server

Setting Up A Public Key Authentication Using Windows with MobaXterm

1. Install MobaXterm. The Home Edition should be sufficient, if you do not require any features from the Professional Edition.

2. Open the MobaXterm SSH Key Generator. From MobaXterm, click on Tools and select MobaKeyGen (SSH key generator).



3. Under Parameters, select RSA. Set the number of bits generated in key to either 2048 or 4096 (4096 is preferred).



4. Under Actions, click Generate. When prompted use your pointing device (mouse, trackpad, trackball, etc.) to move your cursor around the blank area under Key (this generates randomness the utility uses to create your key pair).



The program will display your generated public key under Key whenever it has completed generation.

5. Under Actions, click Save public key.

6. Give your file a name (such as putty_key) and select a location to store it on your computer before hitting Save. Make sure this is a location you can easily find again, your user's home folder is a good place.

7. Under Actions, click Save private key.

8. Make Save as type set to PuTTY Private Key Files (*.ppk), give the file a name (such as putty_private_key), and select a location to store it on your computer before hitting Save. Make sure this is a location you can easily find again, your user's home folder is a good place. It is advisable to set a passphrase to protect this file since all your encryption will be done with this file.



9. Using your University email, send your public key file ONLY, (do not send us your private key) to it-research-support@mst.edu and allow some time for an administrator to copy your public key for remote access. You will receive email confirmation when you are authorized.



10. Create a new session. From MobaXterm, click on Sessions and select New session. Click on SSH for the session type, then enter foundry.mst.edu in the box next to Remote host. Check the box marked Specify username and enter your SSO ID. Do not include “UM-AD\”.



11. Click on Advanced SSH settings, then check the box next to Use private key. Click on the icon in the box, then navigate to select your private key file that you saved previously.



12. Click on Bookmark settings and type in a name (e.g. Foundry) in the box next to Session name. Click OK to save the session. It will automatically connect.



13. Now each time you would like to access the cluster, double-click your saved session (Foundry in the example above). You should now be connected to your account on the remote server.



pub/publickeysetup.txt · Last modified: 2022/05/06 20:15 (external edit)