wiki:BIOS_SshKey

Version 2 (modified by jamverlouw, 8 years ago) (diff)

--

Creating and using a public/private SSH keypair

(For accessing the RP3 virtual machine in the Cloud.)

Creating a keypair on Linux or Mac OSX

  1. Generate a public/private keypair

If you have files named ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub you're fine. Proceed to step 2.

If not, type the following command in ~/.ssh/ :

ssh-keygen -t rsa -C 'your@email.com'

This will ask for a passphrase (twice). Although you could leave it empty, we advise to use a passphrase. See the instructions from GitHub for more info.

  1. Send your public key to the server maintainer

Your public key is in the file ~/.ssh/id_rsa.pub. Send it by email as an attachment. Proceed to step 3 after you got a confirmation.

  1. Login to the VM

For accessing the VM, you need your private key. It is in the file ~/.ssh/id_rsa and you should never share it. SSH will automatically find it.

To login to the VM, type the following command (you might be asked to type the passphrase for your private key):

ssh username@bios-vm.bbmrirp3-lumc.vm.surfsara.nl

Creating a keypair on Windows

(Instructions borrowed from Joyent.)

  1. Download and open the PuTTYgen program.
  2. For Type of key to generate, select SSH-2 RSA.
  3. Click the Generate button.
  4. Move your mouse in the area below the progress bar (note that moving the mouse is actually necessary, as it generates a amount of randomness in the keys). When the progress bar is full, PuTTYgen generates your key pair.
  5. Type a passphrase in the Key passphrase field. Type the same passphrase in the Confirm passphrase field. You can use a key without a passphrase, but this is not recommended.
  6. Click the Save private key button to save the private key. You must save the private key. You will need it to connect to your machine.
  7. Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file and choose Select All. Right-click again in the same text field and choose Copy.
  8. Send an email to the server maintainer with copied content pasted into it.

Note: This method did not seem to work reliably for all of us, so you might want to create a keypair on a Linux or Mac OSX machine instead and copy it to your Windows machine.

Login to the VM from Windows using Putty

  1. Download and open the PuTTY program.
  2. Enter bios-vm.bbmrirp3-lumc.vm.surfsara.nl in the "Host Name" field.
  3. On the left, navigate to category "Connection/SSH/Auth".
  4. Click the "Browse" button and select your private key.
  5. Click the "Open" button to open the connection.
  6. First time, you will be asked to accept the server's signature (do so).
  7. You will be asked for your username.

Troubleshooting

Login to the VM from Windows using MobaXterm

  1. Download, install and open MobaXterm.
  2. Create a new session via Session -> New session.
  3. Enter bios-vm.bbmrirp3-lumc.vm.surfsara.nl in the "Remote host" field.
  4. Tick the Specify username box and fill in your VM username.
  5. Select the remote environment. For a terminal interface use interactive shell, or for a graphical desktop interface use Gnome desktop.
  6. Select your private key file.
  7. Start the session you just created.

Troubleshooting

Login to the VM from Windows or Mac OSX using X2Go

  1. Download and open the X2Go program.
  2. Create a new session (opened automatically, or via "Session" -> "New session").
  3. Enter bios-vm.bbmrirp3-lumc.vm.surfsara.nl in the "Host" field.
  4. Enter your username in the "Login" field.
  5. Click the button next to the "Use RSA/DSA key for ssh connection" field and select your private key.
  6. Select "GNOME" as "Session type" and click the "OK" button.
  7. Open the session you just created.
  8. First time, you will be asked to accept the server's signature (do so).

Troubleshooting

Attachments (5)

Download all attachments as: .zip