Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
13 years, 6 months ago
created public/private keys using puttygen on my computer.
put the public key in the .ssh/authorized_keys folder on the server
setup pageant.exe to use the pk on my computer.
when I run pageant, and connecting using putty it still asks me for my password.
what am I missing?
I did do a:
chmod 700 on .ssh folder
chmod 600 on authorized_keys file
Nov 26, 2009 at 13:21
1,152 4 4 gold badges 20 20 silver badges 32 32 bronze badges
Check your /var/log/secure or /var/log/auth on the Linux server for information why the key is not accepted.
Also, is the .ssh directory in the homedir of (and owned by) the user you are using to connect?
If you want to connect with the root user, it might be disabled in /etc/ssh/sshd_config.
Nov 26, 2009 at 13:58
Note that public key authentication must be enabled in the SSH server config (usually
/etc/ssh/sshd_config). Check for the line:
then restart the SSH server.
If that does not help, try debugging the problem, by running the server in debug mode (if you can). Here's a tutorial:
Nov 26, 2009 at 14:51
9,989 4 4 gold badges 34 34 silver badges 44 44 bronze badges
Make sure the permissions are correct on the keys and authorized keys files on the server.
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
Nov 26, 2009 at 15:52
Simple thing that burned me ... make sure your key is all on one (long) line in authorized_keys .
Nov 26, 2009 at 15:01
1,061 5 5 silver badges 6 6 bronze badges
Looking at the reverse of your situation, I seem to recall that keys generated via ssh-keygen on Linux are not compatible with putty. One needs to first convert the keys using puttygen.exe (I think you can do this via the putty GUI).
So maybe you could try:
Use ssh-keygen to generate some keys on the server - do not save them to the server's .ssh directory.
cat id_dsa.pub >> ~/.ssh/authorized_keys
id_dsa to your computer.
Use putty to convert them to the appropriate format.
Set those keys as the public and private ones for your computer.
Nov 26, 2009 at 15:08
348 1 1 gold badge 3 3 silver badges 9 9 bronze badges
I seem to recall having problems when the users home directory was group/world readable. This blocked the key from working.
Mar 12, 2010 at 7:18
660 4 4 silver badges 8 8 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only