docs:ssh:ssh_tunneling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:ssh:ssh_tunneling [2006/05/12 14:34] – (old revision restored) 127.0.0.1docs:ssh:ssh_tunneling [2008/08/03 00:25] (current) – external edit 127.0.0.1
Line 2: Line 2:
 //for VNC, HTTP, and other applications and protocols// //for VNC, HTTP, and other applications and protocols//
  
-Author:  William M. Hartung+Author:  William M. Hartung\\ 
 Date:  04/13/2005 Date:  04/13/2005
  
Line 17: Line 17:
   - 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}}
 +
 +
  
 ===== SSH Command Line Options ===== ===== SSH Command Line Options =====
 Example: Example:
-<code>  ssh -L 5901:localhost:5901 <user>@<server.name </code>+<code> 
 +ssh -1 -L 5901:localhost:5900 -p 4567 joe@10.5.1.3 
 +</code> 
 +Where... 
 +  * -1 is to force ssh version 1 
 +  * 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) 
 +  * 5901 is the tunneled port on the client (Display 1 in VNC client) 
 +  * 80 is the standard http port - it is tunneled here to provide access to the web server on the client 
 +  * 4567 is a nonstandard port on the host or the host's router to access ssh 
 +  * joe is the user name 
 +  * 10.5.1.3 is the external ip address to access the host over the Internet 
 +  * after all of this, the client should be able to control a remote vnc server by accessing localhost:1, or localhost:5901 
 + 
 +Note - you can also add this, however it is a privileged port only available for root 
 +<code> 
 +-L 80:localhost:80 
 +</code>
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
  • docs/ssh/ssh_tunneling.1147466077.txt.gz
  • Last modified: 2008/08/03 00:25
  • (external edit)