Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ssh port forwarding (tunneling) in linux
- laptop -> gateway -> remote_server_1
- laptop -> remote_server_2
- mylaptop$ ssh -L 3001:localhost:3000 server_2
- server_2$ netcat -l 3000
- ssh -t -t -L 3003:server_1:22 gateway
- ssh -R 3002:localhost:3001 -p3003 localhost
- echo "bar" | nc localhost 3002`
- mylaptop$ ssh -L 3001:localhost:3000 server_2
- server_2$ netcat -l 3000
- mylaptop$ ssh -R 3002:localhost:3001 server_1
- server_1$ echo "foo" | netcat localhost 3002
Add Comment
Please, Sign In to add comment