Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,930

    Question Cannot SSH into server as user via PuTTy.

    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:
    Code:
    No supported authentication methods available
    In PuTTy:
    Code:
    Server refused our key
    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?
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  2. #2
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    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.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  3. #3
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,930
    Yup, user can login with password just not with a RSA key.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  4. #4
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    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.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  5. #5
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,930
    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
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  6. #6
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Quote Originally Posted by JWeb2 View Post
    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.
    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 [email protected]" 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.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  7. #7
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,930
    The user is setup just like the other accounts.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  8. #8
    Join Date
    May 2008
    Posts
    340
    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.
    Twitter : http://twitter.com/eth1networks
    Contact Us : support[at]eth1.in

  9. #9
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,930
    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.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  10. #10
    Use Putty-0.60 version or you may try installing Poderosa. Poderosa is a good alternative for putty.

  11. #11
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    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
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  12. #12
    Join Date
    Jul 2009
    Posts
    240

Similar Threads

  1. cant login to my server using putty
    By netpox in forum Dedicated Server
    Replies: 4
    Last Post: 07-03-2008, 11:09 AM
  2. Server Access Problem using root in putty
    By cctv in forum Hosting Security and Technology
    Replies: 11
    Last Post: 01-03-2008, 05:40 PM
  3. Putty and SSH
    By SecondSight in forum Hosting Software and Control Panels
    Replies: 7
    Last Post: 08-07-2006, 01:48 PM
  4. In Putty
    By rockergirl in forum Web Hosting Lounge
    Replies: 2
    Last Post: 04-19-2006, 11:21 AM
  5. ssh win2000 game server,cygwin,putty
    By zero-maitimax in forum Dedicated Server
    Replies: 1
    Last Post: 10-28-2004, 03:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •