Tricky things when using putty's public/priviate key authZIf 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.