Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Generating SSH-keys Image Modified

 Putty (Windows) Image Modified
  • You can get putty from
  • For SSH-key generation you need puttygen.exe
  • Run puttygen.exe, choose keytype "SSH-2 RSA" and generate
  • In the comment field put your email address
  • Put a passphrase for the key
  • Copy the public key from the field "Public key for pasting into OpenSSH authorized_keys file"
  • Open notepad and make sure to have "word wrap" off (Format -> Word Wrap)
  • Paste the public key to notepad and make sure it is on one line
  • Save the notepad file as
  • Save the private key for your own use as it is the pair of the public key and used when logging in
 OpenSSH (Linux) Image Modified
  • Gererate the SSH-keypair with the command: ssh-keygen -t dsa
  • Specify the file to save the key in when asked
  • Specify a passphrase (it will be asked when using the key)
  • Your public key is now in


 Using SSH-keys when logging in Image Modified

 Putty (Windows) Image Modified
  • You can get putty from
  • For connecting to a server with SSH you need putty.exe
  • Choose the private key to use in putty under Connection -> SSH -> Auth
  • Put the private-key including path in the "Private key file for authentication" field
  • Connect to the server by putting the servers address in Session -> Host Name (or IP address), then click Open
 OpenSSH (Linux) Image Modified
  • For connection to a server with a ssh-key issue the following command: ssh -i private_key_file username@server
    private_key_file is the name of the SSH-key you have generated, if it is not in your current directory you need to
    give the path as well