all. My college network somehow disallows incoming connections. (I can SSH out of the network, but not into it.)
I'm trying to set up an SSH tunnel from my school computer ("school") to a VPS "computer" ("outside") which is outside the school network.
I'm hoping to get to the point where I can do
ssh -p 3000 name@outside
and end up logged into name@school.
Here's how I'm trying to set up the remote port forwarding:
[name@school]$ ssh -R *:3000:localhost:22 outside
This command seems to work. (Running this with a -v flag gives
debug1: Remote connections from *:3000 forwarded to local address localhost:22
debug1: remote forward success for: listen 3000, connect localhost:22
debug1: All remote forwarding requests processed
which looks promising.)
However, when I follow up with a
ssh -p 3000 name@outside
it doesn't work:
ssh: connect to host outside port 3000: Connection refused
I can open up a netcat on the outside server and listen at port 3000, then connect to it with netcat from my school computer--this works fine. If I try to make an SSH tunnel from, say, outside:3000 to school:2000, then try to connect with netcat to outside:3000, I get
nc: connect to outside port 3000 (tcp) failed: Connection refused
The procedure above fails also if I try it between two computers on the school network, so I'm pretty sure the problem is me and not the computers/network.
Many thanks in advance for your help! (edit: sorry, looks like this should go on serverfault?)