--- layout: default navsection: userguide title: Accessing Arvados VM with SSH - Windows Environments ... This document is for windows environments. If you are using a unix environment (Linux, OS X, Cygwin), please visit the "Accessing Arvados VM with SSH - Unix Environments":ssh-access-unix.html Arvados requires a public SSH key in order to securely log in to an Arvados VM instance, or to access an Arvados Git repository. The three sections below help you get started: # "Getting your SSH key":#gettingkey # "Adding your key to Arvados Workbench":#workbench # "Using SSH to log into an Arvados VM instance":#login h1(#gettingkey). Getting your SSH key h2(#windows). Using PuTTY (Note: if you are using the SSH client that comes with "Cygwin":http://cygwin.com you should follow the "Unix":ssh-access-unix.html). "PuTTY":http://www.chiark.greenend.org.uk/~sgtatham/putty/ is a free (MIT-licensed) Win32 Telnet and SSH client. PuTTY includes all the tools a Windows user needs to create private keys and make SSH connections to your virtual machines in the Arvados Cloud. You can "download PuTTY from its Web site":http://www.chiark.greenend.org.uk/~sgtatham/putty/. Note that you should download the installer or .zip file with all of the PuTTY tools (PuTTYtel is not required). If you downloaded the zip file, extract it to the location you wish to install the PuTTY applications. This document assumes that you installed PuTTY in the default directory under @C:\Program Files\@ or @C:\Program Files (x86)\@ (if you are using a 64 bit operating system). h3. Step 1 - Adding PuTTY to the PATH # 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). # Open the Control Panel. # Select _Advanced System Settings_, and choose _Environment Variables_. If you are using newer systems like Windows 7, you may use the following to open _Advanced System Settings_. Open Control Panel. Click on _System and Security_. Click on _System_. Click on _Advanced system settings_ and choose _Environment Variables..._ # Under system variables, find and edit @PATH@. # If you installed PuTTY in @C:\Program Files\PuTTY\@, add the following to the end of PATH: ;C:\Program Files\PuTTY If you installed PuTTY in @C:\Program Files (x86)\PuTTY\@, add the following to the end of PATH: ;C:\Program Files (x86)\PuTTY # Click through the OKs to close all the dialogs you’ve opened. h3. Step 2 - Creating a Public Key # Start PuTTYgen from the Start Menu or the folder where it was installed. # At the bottom of the window, make sure the ‘Number of bits in a generated key’ field is set to 4096. # Click Generate and follow the instructions to generate a key. # Click to save the Public Key. # Click to save the Private Key (we recommend using a strong passphrase). # Select the text of the Public Key and copy it to the clipboard. h3. Step 3 - Set up Pageant Pageant is a PuTTY utility that manages your private keys so is not necessary to enter your private key passphrase every time you make a new SSH connection. # Start Pageant from the Start Menu or the folder where it was installed. # Pageant will now be running in the system tray. Click the Pageant icon to configure. # Choose _Add Key_ and add the private key which you created in the previous step. You are now ready to proceed to "adding your key to the Arvados Workbench.":#workbench h1(#workbench). Adding your key to Arvados Workbench h3. From the Workbench dashboard If you have no SSH keys registered, there should be a notification asking you to provide your ssh public key. On the Workbench dashboard, look for the envelope icon 1 in upper right corner (the number indicates there are new notifications). Click on this icon and a dropdown menu should appear with a message asking you to add your public key. Paste your public key into the text area provided and click on the check button to submit the key. You are now ready to "log into an Arvados VM":#login. h3. Alternate way to add SSH keys If you want to add more SSH keys, click on the user icon in the upper right corner to access the user settings menu, and click on the menu item *Manage ssh keys* to go to the Authorized keys page. On the *Authorized keys* page, the click on the button Add a new authorized key in the upper right corner. The page will reload with a new row of information. Under the *public_key* column heading, click on the cell +New authorized key+. This will open an editing popup as shown in this screenshot: !{{ site.baseurl }}/images/ssh-adding-public-key.png! Paste the public key that you copied to the cliboard in the previous section into the popup text box, then click on the check mark to save it. This should refresh the page with the public key that you just added now listed under the *public_key* column. You are now ready to "log into an Arvados VM":#login. h1(#login). Using SSH to log into an Arvados VM To see a list of virtual machines that you have access to and determine the name and login information, click on *Settings* menu in the top navigation bar and click on *Virtual machines*. Once on the *Virtual machines* page, The *hostname* columns lists the name of each available VM. The *logins* column will have a value in the form of @["you"]@. Your login name is the text inside the quotes. In this guide the hostname will be *_shell_* and the login will be *_you_*. Replace these with your hostname and login name as appropriate. h2(#windowsvm). Logging in using PuTTY h3. Initial configuration # Open PuTTY from the Start Menu. # On the Session screen set the Host Name (or IP address) to “shell”, which is the hostname listed in the _Virtual Machines_ page. # On the Session screen set the Port to “22”. # On the Connection %(rarr)→% Data screen set the Auto-login username to the username listed in the *logins* column on the Arvados Workbench page _Settings %(rarr)→% Virtual machines_ page. # On the Connection %(rarr)→% Proxy screen set the Proxy Type to “Local”. # On the Connection %(rarr)→% Proxy screen in the “Telnet command, or local proxy command” box enter: plink -P 2222 turnout@switchyard.qr1hi.arvadosapi.com %host Make sure there is no newline at the end of the text entry. # Return to the Session screen. In the Saved Sessions box, enter a name for this configuration and click Save. _Note: We recommend you do not delete the “Default” Saved Session._ h3. Connecting to the VM # Open PuTTY from the Start Menu. # Click on the Saved Session name you created in the previous section. # Click Load to load those saved session settings. # Click Open to open the SSH window at the command prompt. You will now be logged into your virtual machine. _Note_: If you see a hung terminal window with no futher action: open a new terminal window and type plink -P 2222 turnout@switchyard.qr1hi.arvadosapi.com shell in it. Hit enter and type _y_ when prompted to cache the session state. Go back and start PuTTY session using the start menu button. You should now be able to log into the Arvados VM and "check your environment.":check-environment.html