I need reverse port forwarding via SSH to my server, such that on the server I can connect to a localhost port, which then is forwarded using the SSH tunnel to my local server.
My local system is windows, remote system Linux. When opening the tunnel using plink with standard password authentication, it works pretty good:
>plink.exe -R *:62050:127.0.0.1:9000 email@example.com
Result on remote machine looks good and forwarding also works fine.
[user@host ~]$ netstat -an | grep 62050 tcp 0 0 127.0.0.1:62050 0.0.0.0:* LISTEN tcp 0 0 ::1:62050 :::* LISTEN
I however want to use that as a pre-debug command in my IDE to establish the tunnel, so I want to use my private key:
>plink.exe -R *:62050:127.0.0.1:9000 firstname.lastname@example.org -i C:\Users\abcdefg\.ssh\id_my.ppk
Connection also works great, I am not asked for a password and connection succeeds. However, there is no port opened:
[user@host ~]$ netstat -an | grep 62050
just returns an empty result. I can make the same observations when using the putty graphical interface. Remote tunnelling works like a charm using plain password auth, as soon as I am introducing a private key file, the connection is established, but the reverse tunnel is not.
How can I solve this?