I have a server with Google Authenticator enabled. It worked fine, and one day I tried to login, and suddenly I'm not able to.

Fortunately, I do have Ajenti installed with a terminal, so it's not a huge deal, but I need to connect to the server from multiple devices, and I no longer can do that with anyone of them.

As far as the error, I get a "Connection Refused" Which is odd, because it worked fine before. Now, I am a novice, so go easy on me if I'm doing something stupid, but having done everything I could I'm stumped.

Error log : https://bitbucket.org/snippets/keyxmakerx/4Bgq

  • Have you checked the times on your server and client devices? Google authenticator only works fine if the times are in sync.
    – Uwe Plonus
    May 29 '15 at 13:20
  • Yes, Time is correct, but it isn't even asking me for the Auth Code, it just immediately says connection refused. May 29 '15 at 13:23
  • From your log file I see several problems: 1. error: Could not load host key: /etc/ssh/ssh_host_ed25519_key is the key there? Do you need this key (else remove it from sshd_config). 2. (pam_google_authenticator)[358]: Invalid verification code and 3. error: PAM: Cannot make/remove an entry for the specified session for nonadmin from Please ort out this problems one after another, starting with the missing server key.
    – Uwe Plonus
    May 29 '15 at 13:28
  • I have fixed those issues by reinstalling the PAM, and removing that key. (Odd, I do not know where that key came from) But i still can't login, and I do not have any logs as to why either. May 29 '15 at 13:56
  • If you get 'connection refused' before the password prompt, it looks like a problem with sshd itself... Check SSH is running with 'ps aux | grep sshd'. Also check you can do 'ssh localhost' from inside the machine. Also check there's no firewall or missing port forward that could block the connection (SSH is TCP port 22)
    – Dirbaio
    Jun 2 '15 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.