Penguin

Differences between version 80 and revision by previous author of SSHNotes.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 80 Last edited on Wednesday, January 28, 2009 9:48:13 am by AristotlePagaltzis Revert
Older page: version 79 Last edited on Sunday, August 10, 2008 9:41:08 pm by JohnMcPherson Revert
@@ -106,28 +106,8 @@
  
 Imagine the fun you can have with multiple [SSH] forwards! 
  
 If you've set up your <tt>.ssh/config</tt> as in the tip above, you can spare yourself typing the same parameters to set up tunnels in the same manner. <tt>-L 5000:localhost:110</tt> translates to <tt>~LocalForward 5000 localhost:110</tt>. If you'd like to have <tt>-g</tt> taken care of as well, add <tt>~GatewayPorts</tt>. <tt>-f</tt> and <tt>-N</tt> don't have corresponding options, but those wouldn't be very useful anyway. 
-  
-  
-!! vhost workaround  
-  
-When trying to connect to an apache server (through a firewall) that has multiple vhosts, you may be able to get the default page apache has been configured to serve, but nothing else.  
-On your localhost edit your /etc/hosts file and add the name of the machine you are trying to connect to over the tunnel.  
-  
-eg. If you were trying to connect to cms-r7-113.cs.waikato.ac.nz  
-add the following to /etc/hosts  
-  
-127.0.0.1 cms-r7-113.cs.waikato.ac.nz  
-  
-and construct your tunnel thus  
-  
-ssh -2 -q -f -N -g -L 80:cms-r7-113.cs.waikato.ac.nz:80 <username>@cms-r7-113.cs.waikato.ac.nz  
-  
-You will now be able to connect to  
-<verbatim>  
-cms-r7-113.cs.waikato.ac.nz/~username  
-</verbatim>  
  
 !!! [X] Connection Forwarding 
  
 If you use the <tt>-X</tt> option to ssh(1), you will enable [X]-connection forwarding. This is essentially a reverse port forward with a few added effects: for instance it will set your <tt>DISPLAY</tt> EnvironmentVariable on the remote end to something like <tt>localhost:15</tt>. Most of the time you won't need to mess with xhost(1) or xauth(1) either. If you've set up your <tt>.ssh/config</tt> as discussed above, you can spare yourself typing <tt>-X</tt> every time using the <tt>ForwardX11</tt> directive.