Skip to content

Instantly share code, notes, and snippets.

@azmankudus
Last active August 3, 2021 03:26
Show Gist options
  • Save azmankudus/322c90742722a0b6678aade2a761b330 to your computer and use it in GitHub Desktop.
Save azmankudus/322c90742722a0b6678aade2a761b330 to your computer and use it in GitHub Desktop.
SSH Tunnel / Port Forwarding
1. Run PuTTY
2. Go to "Connection" -> "SSH" -> "Tunnels"
3. Enter "Source Port" with local port number. e.g.: 10022
4. Enter "Destination" with remote IP address and port number. e.g.: 192.168.101.101:22
5. Click "Add"
6. Go to "Session"
7. Enter "Host Name (or IP address)" with remote intermediary server host/IP. e.g.: 192.168.100.100
8. Enter "Port" with remote intermediary server port. e.g.: 22
9. Click "Open"
10. Enter username
11. Enter password
12. Right click at PuTTY window top bar. Click "New Session"
13. Enter "Host Name (or IP address)" with "localhost".
14. Enter "Port" with port configured at step 3. e.g.: 10022
15. Click "Open"
16. Enter username
17. Enter password
ssh -f -N -T -M -L 10022:192.168.101.101:22 user1@192.168.100.100
ssh -p 10022 user3@localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment