Portal Home > Knowledgebase > Articles Database > Cannot SSH into server as user via PuTTy.


Cannot SSH into server as user via PuTTy.




Posted by ZKuJoe, 10-13-2009, 02:04 AM
I'm having some trouble here and have been fighting with this all day. I am trying to SSH into my server using a user account and RSA key with no luck. I am able to SSH with root fine and my partner can SSH into his user account fine on Fedora, but I am getting the following errors with PuTTy: In /var/log/secure: In PuTTy: I have tried generating the key with puttygen and with ssh-keygen with both RSA and DSA (1024 and 2048 bit). I have configured sshd_config correctly and made sure the users have proper permissions and the authorized_keys file is correct (it's in /root/.ssh/ and /home/user/.ssh/ folder because I want to use the same RSA key for root and user but disable root from logging in remotely in the future). The .ssh folder is set to 0700 and the authorized_keys file is set to 0600. Like I said earlier, my partner is able to login to his account find with a RSA key using the same steps as myself except he is using Linux as his OS whereas I have to use PuTTy (Linux does not work on my laptop so it's not an option ). Any ideas?

Posted by foobic, 10-13-2009, 02:19 AM
Is the user allowed to log in at all? Try enabling password logins (if they're disabled) and verify you can log in as user.

Posted by ZKuJoe, 10-13-2009, 02:24 AM
Yup, user can login with password just not with a RSA key.

Posted by foobic, 10-13-2009, 02:38 AM
Still suggests you have something wrong server-side. It's been a while since I used putty but I'm sure it can handle keys. Try it from the command line with -vvv. Edit: Oh, and check /var/log/secure before that "No supported authentication methods available" to see why the key-based auth failed.

Posted by ZKuJoe, 10-13-2009, 03:06 AM
Ok, this is really weird now. When I SSH from another VPS it requires both the passcode for the RSA key AND my account password, but it lets me login to the user without a problem. Still getting the same error on PuTTy. Oct 13 01:38:56 server sshd[2391]: Received disconnect from MY_IP: 14: No supported authentication methods available Oct 13 01:44:11 server sshd[3195]: Received disconnect from MY_IP: 14: No supported authentication methods available Oct 13 01:45:08 server sshd[3429]: Received disconnect from MY_IP: 14: No supported authentication methods available Oct 13 02:10:55 server sshd[7270]: Received disconnect from MY_IP: 14: No supported authentication methods available Oct 13 02:13:31 server sshd[7608]: Received disconnect from MY_IP: 14: No supported authentication methods available Oct 13 02:15:54 server sshd[8041]: Received disconnect from MY_IP: 14: No supported authentication methods available Oct 13 02:17:14 server sshd[8305]: Received disconnect from MY_IP: 14: No supported authentication methods available Oct 13 02:18:13 server sshd[8369]: Received disconnect from MY_IP: 14: No supported authentication methods available

Posted by foobic, 10-13-2009, 03:30 AM
That means the key is being refused, just like it is from putty, so it falls back to password auth. Try "ssh -vvvv -i keyfile user@host" from the VPS. Edit: You are copying the key.pub file to authorized_keys, right? (not the private key) Last edited by foobic; 10-13-2009 at 03:37 AM.

Posted by ZKuJoe, 10-13-2009, 04:08 AM
The user is setup just like the other accounts.

Posted by eth1, 10-13-2009, 05:57 AM
Make sure when you paste the SSH key into the file authorized_keys, the complete key is pasted and there are no line breaks/space in it.

Posted by ZKuJoe, 10-13-2009, 06:53 AM
Thanks but this isn't my first time setting up SSH keys. I'm guessing it's a PuTTy issue and I'll probably be stuck running a Linux VM on my laptop.

Posted by benthetech4u, 10-13-2009, 07:12 AM
Use Putty-0.60 version or you may try installing Poderosa. Poderosa is a good alternative for putty.

Posted by david510, 10-13-2009, 02:03 PM
The issue with the ssh keys happen most of the time with wrong file permission. Make sure the related files have these permissions. authorized_keys and authorized_keys2 --> 600 .ssh --> 700 Home Directory --> 711 Keys (id_dsa,id_rsa) --> 600 Public Keys (id_dsa.pub,id_rsa.pub) --> 644

Posted by DJMizt73, 10-13-2009, 03:36 PM
have you tried this? http://tartarus.org/~simon/putty-sna...errors-no-auth



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
server questions (Views: 280)
Uk based reseller (Views: 323)
Maxiehost Review (Views: 320)