[Solved] Locked out of SSH?

Discussion in 'Systems Administration' started by Kait18, Jul 12, 2014.

  1. Hi, I recently bought a VPS classic in OVH, and I think somehow I just got locked out of SSH. Everything was working fine earlier today while I was in SSH, running some commands. After a while, I rebooted my VPS for the first time, and since then, I'm not able to access SSH from my PC. When I try to connect through putty, I get the following:
    Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)
    I get the same message when I try connecting with Filezilla via sftp. The only way I can connect is by using "KVM" in the OVH panel. Somehow, after rebooting the VPS, everything got screwed up. Also, ever since that reboot, httpd stopped working. When I tried "service httpd status" a while ago, I got "httpd dead but subsys locked". Any idea on how to solve these problems? I'm new to using SSH, and I'm totally lost at the moment. Thanks for reading this thread :)

    After some researching, I tried to read the /var/log/secure/, this is what I found it it's useful:
    #1 Kait18, Jul 12, 2014
    Last edited: Jul 12, 2014
  2. Any ideas on how to solve this? Sorry for bumping right now, but I waited a while to see if it fixed itself, went to check the httpd service status, and it says "httpd (pid 1696) is running..." but I still can't access any page from my server. In the OVH panel httpd appears as offline. The problem with connecting to SSH from my PC is still happening, with the same message.
  3. Contact OVH.
  4. Are they able to help me with these issues? I've heard some horrible reviews about their support, but I've never tried it out.
  5. Just contact them - see what happens. Let us know if you get it figured out.
  6. @ExplodedCreeper Okay, I just got their reply.
    My original message:
    Good afternoon, I am having problems while trying to access SSH. I am using the client called "putty". Each time I try to connect, after typing my username, the session stops responding with the message "Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)". This also happened with "Filezilla" while trying to enter sftp.

    I am afraid that this was not happening until I rebooted my VPS, by using the OVH panel. Ever since that reboot, I have been getting this error message. When I rebooted my VPS, I did so without rescue mode. I can only log in to SSH from "KVM" in my OVH panel. Do you have any idea on how to solve this problem? I have another problem apart from not being able to log in to SSH: my httpd service is not working.

    HTTPD was working before the restart, but now, even though it said "httpd (pid 1696) is running..." when I tried "service httpd status" on KVM, for some reason, the panel says httpd is offline, and I can't access my VPS' web directory files from my browser. Is there any way to solve this as well? All of these problems started since I made the reboot. I am running my VPS on CentOS. Thanks for reading my support message.
    Yours Faithfully,
    <My name here>

    Their reply:

    There seems to have strict firewall rules on your VPS :

    $ nmap -PN <my VPS' address>

    Starting Nmap 5.21 ( http://nmap.org ) at 2014-07-12 19:14 EDT
    Nmap scan report for <my VPS' address> (<my VPS' IP>)
    Host is up (0.93s latency).
    rDNS record for <IP>: <>
    Not shown: 999 filtered ports
    22/tcp open ssh

    Nmap done: 1 IP address (1 host up) scanned in 44.13 seconds

    A normal nmap scan gave nothing, I have to use -PN to scan it. Usually it is a firewall related-issue. And the httpd service is either not running or the port is closed, but I don't see how a reboot can impact this sort of thing.

    That being said, unfortunately, we do not support software-related issues. OVH supports its hardware, infrastructure, network and manager. Anything that has to do with how-tos, we do not handle. Also, you can repair your VPS with the RescueMode or reinstall it.

    <Support agent name> @ OVH Support
    I wrapped in <> some details I prefer to keep to myself. Anyway, any idea about what this means? Do I need to change my Firewall rules? :)
  7. login to rescue, chroot it. Remove all firewall based apps, reset ssh configs then reboot.
  8. Tux


    You're locked out of SSH because it seems you either disabled password authentication and did not add a SSH public key, or you are using the wrong SSH key.
    • Like Like x 1
    • Agree Agree x 1
    • Informative Informative x 1
  9. kill_da_trolls


    Make sure that you have your private key when connecting, and mount your main drive from rescue now and make a backup if you need to reinstall.
    • Useful Useful x 1
  10. This thread made me worry about my dedi at OVH :confused:
  11. I am really new when it comes to using SSH. What do you mean with SSH public key?

    Why? As I said above, I'm new to using SSH, so I've might done something wrong. I think that after rebooting my server, my Iptables got reset. Then I got lots of ports blocked. I already solved the httpd problem, only missing SSH :) Something makes me think its my fault though.
  12. I thought about what you guys told me, and just solved the problem thanks to you guys. In case it's useful: Just as Tux and kill_da_trolls suggested, I didn't have my correct private key. Even though I didn't understand that part, I just went ahead and enabled password authentication. For the httpd problem, I had to remove my current iptables, which were reset in the reboot, and configure them again. Thanks for the help guys! :)
    • Friendly Friendly x 3