misc:ssh_tunneling
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
misc:ssh_tunneling [2014-06-28 13:36] – [SSH tunneling] jens | misc:ssh_tunneling [2024-05-18 18:41] (current) – Add discussion jens | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== SSH tunneling ====== | ====== SSH tunneling ====== | ||
- | |||
Sometimes you might be elsewhere, but need to log in to a system on your network via e.g. VNC or RDP. You don't have a VPN at hand, the firewall of course doesn' | Sometimes you might be elsewhere, but need to log in to a system on your network via e.g. VNC or RDP. You don't have a VPN at hand, the firewall of course doesn' | ||
Line 8: | Line 7: | ||
ssh -C -N -L <local port>:< | ssh -C -N -L <local port>:< | ||
Afterwards, connect to '' | Afterwards, connect to '' | ||
+ | |||
+ | Note that it will seem as if your SSH connection hangs because no login will happen. That is normal, as soon as you < | ||
===== Examples ===== | ===== Examples ===== | ||
Line 29: | Line 30: | ||
Then, connect your RDP viewer to localhost and you "get the picture": | Then, connect your RDP viewer to localhost and you "get the picture": | ||
rdesktop localhost | rdesktop localhost | ||
+ | | ||
+ | ==== Website ==== | ||
+ | There might be a situation when you want to tunnel a whole website through an SSH connection running to another host. For example, if you do not trust VPN providers (which you maybe shouldn' | ||
+ | |||
+ | Websites can be tricky though because of heavy third-party integrations nowadays, so the easiest way to do that is to create a SOCKSv5 proxy and use that in your browser. | ||
+ | |||
+ | To start the proxy, run this SSH command: | ||
+ | ssh -C -N -D 8080 <remote machine to connect to> | ||
+ | |||
+ | Afterwards, use '' | ||
+ | |||
+ | Menu -> Settings -> General -> Network Settings -> Settings -> Manual Proxy Configuration | ||
===== SSH Options ===== | ===== SSH Options ===== | ||
These SSH options are used: | These SSH options are used: | ||
^ -C | Use compression\\ Don't use this option on slow machines! | | ^ -C | Use compression\\ Don't use this option on slow machines! | | ||
+ | ^ -D | Create a local SOCKS port | | ||
^ -N | Don't execute a remote command (no login prompt) | ^ -N | Don't execute a remote command (no login prompt) | ||
^ -L | Use port forwarding (tunneling) | ^ -L | Use port forwarding (tunneling) | ||
For more information please see '' | For more information please see '' | ||
+ | |||
+ | ~~DISCUSSION~~ |
misc/ssh_tunneling.1403962582.txt.gz · Last modified: 2016-02-16 13:32 (external edit)