Difference between revisions of "Setting up Public key authentication"

From Warwick Student Cinema
Jump to: navigation, search
(Instructions)
Line 18: Line 18:
 
# Open the file '''authorized_keys''' for editing, or create a new file if it doesn't exist.
 
# Open the file '''authorized_keys''' for editing, or create a new file if it doesn't exist.
 
# Paste in your public key, making sure it is on a single line.
 
# Paste in your public key, making sure it is on a single line.
  +
# Set permission on the '''.ssh''' directory to '''0700''' (rwx------) and on '''authorized_keys''' to '''0600''' (rw-------)
 
# Close WinSCP or equivalent.
 
# Close WinSCP or equivalent.
   

Revision as of 13:38, 5 November 2009

Windows

Requirements

You will need:

  • PuTTY with PuTTYgen and Pageant. A complete installer can be downloaded from [1].
  • WinSCP or other SFTP client. WinSCP can be downloaded from [2].

Instructions

  1. Open PuTTYgen.
  2. Click 'Generate' to create a new key.
  3. Enter a passphrase.
  4. Save the Private key file. It should have an extension .ppk.
  5. Copy the public key from the text box, then close PuTTYgen.
  6. Open WinSCP or equivalent and connect to filmsoc.warwick.ac.uk. Login with your username and password.
  7. Open the directory .ssh (note the dot) or create it if it doesn't exist.
  8. Open the file authorized_keys for editing, or create a new file if it doesn't exist.
  9. Paste in your public key, making sure it is on a single line.
  10. Set permission on the .ssh directory to 0700 (rwx------) and on authorized_keys to 0600 (rw-------)
  11. Close WinSCP or equivalent.

Usage

  1. Open Pageant: an icon should appear in the system tray.
  2. (Right-)click the icon and select add key.
  3. Open your private keyfile and enter your passphrase when requested.

Programs such as PuTTY, WinSCP, bzr, etc. should automatically detect the loaded key and use that for authentication - just supply your username where relevant.

Troubleshooting

Okay, so I can't get this to work. If you succeed, please answer following;

  1. Does the paste string for authorized_keys need bits removing from each end?