Both sides previous revision Previous revision Next revision | Previous revision |
docs:ssh:ssh_tunneling [2007/01/31 08:51] – billh | docs:ssh:ssh_tunneling [2008/08/03 00:25] (current) – external edit 127.0.0.1 |
---|
- Once an SSH (Putty) connection is established, the forwarded ports will work as though they are running on the local (client) machine. This means that if you forwarded port 80 for a web server on the host, the client could just enter localhost in the address of their web browser, and access the web server on the host. For a VNC connection, just enter localhost:1 as shown in Figure 4 (the “1” corresponds with the 5901 port entered in the Putty configuration – VNC port 5902 would be display “2,” 5903 would be display “3,” and so on).\\ {{server.png|Figure 4}} | - Once an SSH (Putty) connection is established, the forwarded ports will work as though they are running on the local (client) machine. This means that if you forwarded port 80 for a web server on the host, the client could just enter localhost in the address of their web browser, and access the web server on the host. For a VNC connection, just enter localhost:1 as shown in Figure 4 (the “1” corresponds with the 5901 port entered in the Putty configuration – VNC port 5902 would be display “2,” 5903 would be display “3,” and so on).\\ {{server.png|Figure 4}} |
- Remember that using a VNC application through an SSH tunnel will be slower than using VNC independently. However, the SSH tunnel provides encryption so that you will not be subject to malicious activity by a hacker. You may be able to increase performance by sacrificing color, as shown in Figure 5. Many VNC Servers allow configuration of more performance options, such as cursor rendering, what and when to update, and higher performance encoding options.\\ {{color.png|Figure 5}} | - Remember that using a VNC application through an SSH tunnel will be slower than using VNC independently. However, the SSH tunnel provides encryption so that you will not be subject to malicious activity by a hacker. You may be able to increase performance by sacrificing color, as shown in Figure 5. Many VNC Servers allow configuration of more performance options, such as cursor rendering, what and when to update, and higher performance encoding options.\\ {{color.png|Figure 5}} |
| |
| |
| |
Example: | Example: |
<code> | <code> |
ssh -L 5901:localhost:5900 -p 4567 joe@10.5.1.3 | ssh -1 -L 5901:localhost:5900 -p 4567 joe@10.5.1.3 |
</code> | </code> |
Where... | Where... |
| * -1 is to force ssh version 1 |
* 5900 is the vnc port on the host | * 5900 is the vnc port on the host |
* localhost is the computer we want to access (this could be another ip within the host's network if we want to control another computer) | * localhost is the computer we want to access (this could be another ip within the host's network if we want to control another computer) |