--- layout: default navsection: userguide title: Getting your ssh key navorder: 2 --- h1. Getting your ssh key This section consists of two sets of instructions, depending on whether you will be logging in using a "Unix":#unix (Linux, OS X, Cygwin) or "Windows":#windows client. h2(#unix). Unix: Using ssh-keygen First, check if you have an existing public key that you would like to use
$ cd ~/.ssh $ lsIf there is a file @id_rsa.pub@ then you are all set. Copy the contents of @id_rsa.pub@ onto the clipboard and return to the "Setting up ssh keys":index.html#settingupssh . If there is no file @id_rsa.pub@, or you have no @~/.ssh@ directory, you must generate a new key. h2(#windows). Windows: Using PuTTY (Note: if you are using the ssh client that comes with "Cygwin":http://cygwin.com you should follow the "Unix":#unix instructions). PuTTY is a free (MIT-licensed) Win32 Telnet and SSH client. PuTTy includes all the tools a windows user needs to set up Private Keys and to set up and use SSH connections to your virtual machines in the Arvados Cloud. You can use PuTTY to create public/private keys, which are how you’ll ensure that that access to Arvados cloud is secure. You can also use PuTTY as an SSH client to access your virtual machine in an Arvados cloud and work with the Arvados Command Line Interface (CLI) client. You may download putty from "http://www.putty.org/":http://www.putty.org/ . Note that you should download the installer or .zip file with all of the PuTTY tools (except PuTTYtel). __Step 1 - Adding PuTTY to the PATH__ 1. After downloading PuTTY and installing it, you should have a PuTTY folder in C:\Program Files\ or C:\Program Files (x86)\ (if you are using a 64 bit operating system). If you downloaded a zip file, extract it to the location you wish to install the PuTTY applications. 2. Open the Control Panel 3. Select Advanced System Settings, and choose Environment Variables 4. Under system variables, find and edit @PATH@. 5. Add the following to the end of Path (make sure to include semi colon and quotation marks): ;\"C:\Program Files (x86)\PuTTY\" 6. Click through the OKs to close all the dialogs you’ve opened __Step 2 - Creating a Public Key__ 1. Open PuTTYgen from the Start Menu 2. At the bottom of the window, make sure the ‘Number of bits in a generated key’ field is set to 4096 3. Click Generate and follow the instructions to generate a key 4. Click to save the Public Key 5. Click to save the Private Key (we recommend using a strong passphrase) 6. Select the Public Key text in the box and copy (for next step) Now your key is successfully generated. __Step 3 - Load Your Public Key in to your Arvados Account through Workbench__ 1. Open Workbench on the cloud where you have an arvados account 2. Go to Access > Keys in the menu 3. Click to create a new key 4. In the last column “public key” click on the text that says “none” and paste the public key from PuTTYgen into the box. Your public key is now registered with the Arvados cluster. __Step 4 - Set up Pageant__ 1. Start Pageant from the PuTTY folder in the start menu 2. Pageant will now be running in the system tray. Click the icon to configure. 3. Choose Add Key and add the private which corresponds with the public key you loaded in your Arvados account through work bench. Pageant is now configured. It will run in the background as a system service. Note: Pageant is a PuTTY utility that manages private keys which makes repeatedly logging in through SSH less of a hassle. __Step 5 - Set up PuTTY__ 1. Open PuTTY from the Start Menu 2. On the Session screen set the Host Name (or IP address) to “shell” 3. On the Session screen set the Port to “22” 4. On the Connection > Data screen set the Auto-login username to your VM’s Login,. You can find your login name in Workbench under Access > VMs last column on the table. 5. On the Connection > Proxy screen set the Proxy Type to “Local” 6. On the Connection > Proxy screen in the “Telnet command, or local proxy command” box enter “plink -P 2222 turnout@switchyard.qr1hi.arvadosapi.com %host”. Make sure you remove the “\n” from the end of the line. 7. Return to the Session screen. In the Saved Sessions box, enter a name for this configuration and hit Save. __Step 6 - Launch an SSH Session__ 1. Open PuTTY 2. Click on the Saved Session name you created in Step 5 3. Click Load to load those saved session settings 4. Click Open and that will open the SSH window at the command prompt. You will now be logged in to your virtual machine. _Note: We recommend you do not delete the “Default” Saved Session._