I have 2 CentOS boxes with literally identical sshd configs and overall setups.

Box A can SSH to Box B just fine, but Box B can't SSH to Box A using publickey authentication (works fine with password auth). I've checked and re-checked the keys, setup, etc. literally 100 times and it just won't work.

When Box B offers the RSA public key to Box A, Box A literally just seems to ignore it. Normally it should return a packet of "type 60" but instead it again returns a type 51 and re-announces the authentications that can continue.

Here's the debug info. Does anyone have any idea what might cause this?

debug1: Offering RSA public key: /home/patrick/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password

And here's the relevant part of my /etc/ssh/sshd_config:

Subsystem   sftp    /usr/libexec/openssh/sftp-server
GatewayPorts no
AllowTcpForwarding yes
KeepAlive yes
Protocol 1,2
Port 8855
IgnoreRhosts yes
IgnoreUserKnownHosts no
PrintMotd yes
StrictModes yes
PubkeyAuthentication yes
PermitEmptyPasswords no
RSAAuthentication yes

And this is using OpenSSH_7.4p1, OpenSSL 1.0.2k-fips on both boxes.


Crazy, it was an selinux issue. Just figured it out. I had to do:

restorecon -R -v /home/patrick/.ssh

Just putting this here for posterity ...

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.