Local machine running my scripts needs to access a remote server's DB.
Last week I could do, on the local machine
ssh -f -N -T -L1081:localhost:3306 ueser@remoteserver -p2222
on the local machine:
# netstat -an | egrep "tcp.*:1081.*" tcp 0 0 127.0.0.1:1081 0.0.0.0:* LISTEN tcp6 0 0 ::1:1081 :::* LISTEN
then telling my scripts to use port 1081 for mysql connections worked. This netstat command shows me im accepting connections fine on the local side but the same check on the remote machine the one with the actual mysql server is not listening in on 1081 at all, which wasn't the case before
I checked sshd_config which seems to allow tunnelling, that is no config change.
I also tried opening a tunnel to another server on my network and that's also not working, is my command crap or something? Tried with various combinations of