I have set up a reverse ssh tunnel using
ssh -R 22100:127.0.0.1:22 remoteuser@remotehost
on machine 1. This machine authenticates with the remote using keys.
The remote host uses the following sshd_config options:
...
PubkeyAuthentification yes
PasswordAuthentification no
...
This works well from a third machine that has it's keys recognised by the remote server. I.e. it logs on correctly to machine 1 that set up the tunnel initially, using ssh remoteuser@remotehost -p 22100
.
However, when I try to login from a forth machine that has no keys that are recognised by the remote server, I'm still being asked for a password. I.e. on the forth machine it looks like this:
ssh remoteuser@remotehost
# returns Permission denied (publickey)
ssh remoteuser@remotehost -p 22100
# is asking for password for remoteuser@remotehost
Why am I getting the password option when trying to connect to the reverse tunnel port? I don't seem to be able to use the password though. How can I disable that the password is even being asked for, if no keys are recognised?