Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I'm running a server with CentOS and Apache and I cannot log in anymore because there is no authentication method. This is because I was messing with the sshd_config ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2013
    Posts
    3

    Exclamation Authentication does not work for my server and I can't log in


    Hello,

    I'm running a server with CentOS and Apache and I cannot log in anymore because there is no authentication method. This is because I was messing with the sshd_config file and I wanted to temporarily enable logging in as root directly without having to sign in as my username first. I think what happened is I changed "PasswordAuthentication" to 'no' when I should have kept it on.

    When I try to log into putty I get the error: "Disconnected: No authentication methods available (server sent: publickey, gssapi-keyex, gssapi-with-mic)"

    I'm really worried because now I can't log in as root or my regular username. Please help!

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,392
    Hi and welcome

    Do you have key authentication already in place by any chance?
    If not, then these options come to mind:
    - login via a bmc or ilo. Production grade servers from hp, ibm, etc do have this. It offers the equivalent of a local console.
    - login via serial console. This needs a second machine and setup of course.
    - Ask on-site personnel to locally login and change the config. This needs the right SLAs in the contract ("Remote Hands"), a certain knowledge level of the personnel and some trust in them.
    - You can drive to the datacenter yourself and repair the config locally.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    May 2013
    Posts
    3
    Thank you for your reply. I do have key authentication but I do not have the private key on this machine. If I were to repair it locally what steps would I have to take? Will I be able to login with the same credentials or will they be disabled? Sorry if this is a noobish question.

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,392
    If the key based auth is in place (ie: the server has your public key in a userīs ~/.ssh/authorized_keys and the sshd config allows it),
    then you would need access to your private key and either use it from a unix workstation directly, or convert the private key to a putty private key and use it.

    A local login is independent from the sshd config.
    From the info you provided:
    - In /etc/ssh/sshd_config: Set "PasswordAuthentication yes"
    - Restart sshd
    - Test the login with e.g. ssh localhost
    Last edited by Irithori; 05-20-2013 at 05:10 PM.
    You must always face the curtain with a bow.

  5. #5
    Just Joined!
    Join Date
    May 2013
    Posts
    3
    Awesome, thank you. I'll update later to confirm whether or not I got it to work.

Posting Permissions

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