My Notepad

  • My Linux Notes
  • My Grid Notes
  • To do List
  • Saturday, April 22, 2006

     
    Tricky things when using putty's public/priviate key authZ

    If you are annoyed by the "Server rejected our keys" message when try to use putty's
    key authZ to escape the password inputing or more security whatever, this is for u.

    1. Use keygen.exe downloaded from putty website to generate a public/private key pair, save the private key in a local file.(RSA-2 is recommanded)

    2. *Do not* save the public key in the file!! Instead, *copy* the public key text from the text
    box directly to ~/.ssh/authorized_keys. You can have multiple public keys save in this file, the
    format should be like this:

    ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEApsDL6Ude//PCA8SAW1KAPteZ2ORy4E6HpivQ+1TSgku66V+A0iC+UCXEidYGgoVP4Zg5FGKYlNcGAYjvy6FGf4PLD8ZGo9OeQcMZIl5qGy/Ydvi5Hhc
    b6oVJZhTIK8ng+mjSISfU6BCBj1GszPXNCiY0L3mU5MN6pXuG4I6xdOU= kang@synew
    ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIB/ICLnTmYYq1JgLgz1RHBfUUUCIX+LQ7flBYpZ2S6FTmHCaIkn0e1oaPPqlyMlsZf0jtkqFKtged4FrqzVS1p9xK0gZpMnXq2fm9Mxr48EQQ35G0eAKMo
    Vvu/V2FG093tknEp71X0yC3Y1ckZd3IkirExKlqo3ki/2Uv5cQLEqhQ== putty_synew@T42

    3. In putty's Connection-> Auth window, tell putty to use the private key file you stored in your local disk.

    4. *IMPORTANT* Make sure use following comands to modify the privilges of following file
    directory, otherwise you will see" Server rejected our keys"!!
    chmod 740 ~/.ssh
    chmod 740 ~/.ssh/authorized_keys

    5. Now you should be able to use key authZ to login the server.

    Comments: Post a Comment



    << Home

    Archives

    December 2005   January 2006   February 2006   April 2006   May 2006   June 2006   July 2006   November 2006   February 2007   May 2007   June 2007   November 2007   February 2008   March 2008   April 2008   August 2008   December 2008   March 2009   April 2009   May 2009   June 2009   October 2009   November 2009   December 2009   May 2013  

    This page is powered by Blogger. Isn't yours?