Skip to end of metadata
Go to start of metadata

Generating SSH-keys 

 Putty (Windows) 
  • You can get putty from http://www.putty.org/
  • 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 your_loginname.pub
  • Save the private key for your own use as it is the pair of the public key and used when logging in
 OpenSSH (Linux) 
  • 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 file.pub

 

 Using SSH-keys when logging in 

 Putty (Windows) 
  • You can get putty from http://www.putty.org/
  • 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) 
  • 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
  • No labels