Page 1 of 1

Can't connect to remote hosts after configuring google-authenticator with SSH

Posted: 2018/07/21 02:06:07
by Kahweol808
I wanted to test google-authenticator on my workstation before using it elsewhere. Everything works great, when connecting to my workstation remotely. Unfortunately, when I'm sitting at my workstation trying to ssh to my servers or use scp, I get an error message.

/etc/ssh/ssh_config: line 69: Bad configuration option: authenticationmethods
/etc/ssh/ssh_config: terminating, 1 bad configuration options

This corresponds to this line in /etc/ssh/sshd_config
# Change to no to disable s/key passwords
ChallengeResponseAuthentication yes
#ChallengeResponseAuthentication no <-----Line 69

I tried to uncomment it and comment the line above it, restart sshd.service, and the same error message comes up.

I tried googling and I haven't found anything yet. Any help would be greatly appreciated!

Re: Can't connect to remote hosts after configuring google-authenticator with SSH

Posted: 2018/07/21 03:56:40
by Kahweol808
I found the problem!

I accidently added the line "AuthenticationMethods publickey,password publickey,keyboard-interactive" to the wrong file, /etc/ssh/ssh_config instead of /etc/ssh/sshd_config.

After deleting this line and restarting sshd.service, everything is working as it should.

Line 69 happened to correspond to the "ChallengeResponseAuthentication no" in the sshd_config, leading to my confusion since I thought I was working in this file the whole time.

I hope this helps anyone who makes the same mistake.