Skip to content

Welcome to ka8zrt.com

Sections
Personal tools
You are here: Home » How to ... » Using your public key
Log in
 
Views

Using your public key

Document Actions
last edited 2 years ago by cinnion

This is mostly a stub at this point, and if you are using PuTTY, you are encouraged to read Section 8.3 of the PuTTY documentation. However, I will add the following at this time.

If you are using PuTTY and saved a copy of your public key as done in step 4 of the procedure for generating keys using PuTTYgen, you need not worry about using PuTTYgen to get a nice string to stick in your authorized_keys2 file. Instead, you can just copy that public key file which you saved to the target system in question, and bring up the editor on both files. The important things to remember about the authorized_key2 file are:

  • For SSHv2?, all lines start with either "ssh-dss" or "ssh-rsa", with additional fields following it separated by a space.
  • The second field is always a single long (typically 200-500 characters) string of what will appear to be random letters, numbers and some special characters such as "/" and "+". This field is case sensitive, and will contain no spaces. It is a long string of binary (0 and 1) bits encoded into a form which is relatively easy to read (NOTE: not say or understand, just read), and which can be easily copied via an editor or a cut and paste operation.
  • The remaining fields (generally only 1) will be the comments for the key.

With this in mind, you can open the public key file created by putty and reformat it into a form acceptable to most other SSH implementations. You do so by taking the comment on line 2 of the PuTTY public key file, putting it at the end of the line created by merging all the other lines between the BEGIN and END lines into a single long gibberish "word", and then placing all of this after either the "ssh-dss" or "ssh-rsa" in your authorized keys file.

It should be noted that a public key need not be kept anywhere near as secure as your private key and the pass phrase used to protect it. You can safely email your public key to friends and administrators of sites which are setting up accounts for you. However, I would strongly suggest that your authorized keys files be kept readable only by yourself. This is often enforced by many SSH implementations, where a authorized key file will not even be considered if it is found to be readable, and most especially writable by someone other than the owner.

« August 2008 »
Su Mo Tu We Th Fr Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
 
 

Powered by Plone

This site conforms to the following standards: