I'm using a reverse SSH tunnel on Debian with openssh-server and autossh: something like
-R 1234:localhost:22 with a monitoring port also set.
Generally, it works well, but I'm having the following problem: the tunnel opens and I see my remote server listening on
127.0.0.1:1234. But as soon as I try to establish a connection to this address:port, I get a "Connection refused" message and the port closes until autossh reopens it.
I have another tunnel, a
-L. It sends its logs to this remote server. This tunnel seems to work as I'm receiving logs.
Anyone would have an idea of what's happening?