cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

protocol:ssh:portfoward.html



Linux
ssh - How to use ssh command in Linux (With Examples)
ssh configuration
SSH Portfoward
X11 Forwarding

SSH Portfoward

Local Foward

RemoteDesktop 1

+----------------+     +-------------+      +---------------+
| PC             |---> |SSH Server   | ---> |Target Server  |
|  192.168.100.2 |     | 192.168.0.5 |      |  192.168.0.10 |
|    Port 3388   |     |             |      |   Port 3389   |
+----------------+     +-------------+      +---------------+
  1. PC # ssh -L 3388:192.168.10:3389
  2. PC # mstsc /v:127.0.0.1:3388


RemoteDesktop 2

+----------------+     +-------------+      +---------------+
| PC             |---> |SSH Server   | ---> |Target Server  |
|  192.168.100.2 |     | 192.168.0.5 |      |  192.168.0.10 |
|                |     |  Port 3388  |      |   Port 3389   |
+----------------+     +-------------+      +---------------+
  1. SSH Server # ssh -L 3388:192.168.10:3389
  2. PC > mstsc /v:192.168.0.5:3388


Dynamic Foward

+----------------+     +-------------+      +---------------+
| PC             |---> |SSH Server   | ---> |Target Server  |
|  192.168.100.2 |     | 192.168.0.5 |      |               |
|   port 10000   |     |             |      |               |
+----------------+     +-------------+      +---------------+
PC 
# ssh -D 10000 user@192.168.0.5
# http_proxy=socks5://127.0.0.1:40000 yum install <package_name>



protocol/ssh/portfoward.html.txt ยท Last modified: 2019/04/21 by admin

Page Tools