<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top" style="font: inherit;"><p>So once you have set this up, what do you do to actually use it? You mentioned that you used two aliases</p>
<p>What does your ssh commandline look like now when you're establishing these connections?</p>
<p>Thanks,</p>
<p>Lan<br>
</p>
</td></tr></table> <div id="_origMsg_">
<div style="font-family:arial, helvetica, sans-serif:font-size:10pt">
<br />
<div style="font-family:times new roman, new york, times, serif;font-size:12pt">
<font size="2" face="Tahoma">
<hr size="1">
<b>
<span style="font-weight:bold;">From:</span>
</b>
Claude Felizardo <cafelizardo@gmail.com>; <br>
<b>
<span style="font-weight:bold:">To:</span>
</b>
SGVLUG Discussion List. <sgvlug@sgvlug.net>; <br>
<b>
<span style="font-weight:bold:">Subject:</span>
</b>
[SGVLUG] example .ssh/config for port forwarding <br>
<b>
<span style="font-weight:bold;">Sent:</span>
</b>
Sat, Jan 12, 2013 8:08:23 AM <br>
</font>
<br>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top" style="font:inherit;">During the ssh tunneling presentation at the last meeting I mentioned<BR>that I set up quite a few forwards when I connect from work to home.<BR>Because I might open multiple connections I don't want to clutter my<BR>screen with lots of bind errors because I have already created a<BR>listener for the port so I have two aliases. The first just does a<BR>simple connect, the other sets up a slew of forward assignments so I<BR>can access multiple devices at home. I can then open a web browser<BR>and go to localhost:5001 to connect to my router for example. So<BR>here's part of my .ssh/config file:<BR><BR>ForwardX11 yes<BR>ForwardAgent yes<BR>ForwardX11Trusted yes<BR><BR>Host home<BR> Hostname my.ip.at.home<BR> Port 5022 <--
use non standard<BR>port for ssh<BR><BR>Host home-forwards<BR> Hostname my.ip.at.home<BR> Port 5022 <-- use non standard<BR>port for ssh<BR> # forward connections to TiVos<BR> LocalForward 5052 10.5.1.52:80 <- TiVo's have static IP's so I<BR>just add my base port number<BR> LocalForward 5053 10.5.1.53:80<BR> LocalForward 5054 10.5.1.54:80<BR> # forward router<BR> LocalForward 5001 10.5.1.1:80 <-- connect to router<BR> # forward voice<BR> LocalForward 5002 10.5.1.2:80<BR> # forward wireless router<BR> LocalForward 5004 10.5.1.4:80<BR> # forward webmin<BR> LocalForward 5010 localhost:10000<BR><BR> # forward voice<BR> LocalForward 5254 10.5.1.254:80<BR><BR># file server<BR>
LocalForward 5100 10.5.1.10:80 <-- web server<BR> LocalForward 5122 10.5.1.10:22 <-- ssh<BR> LocalForward 5110 10.5.1.10:10000 <-- webmin<BR><BR># hp color printer<BR> LocalForward 5211 10.5.1.21:80<BR><BR># ReadyNAS<BR> LocalForward 5200 10.5.1.20:80<BR> LocalForward 5222 10.5.1.20:22<BR> LocalForward 5243 10.5.1.20:443<BR><BR># naspro<BR> LocalForward 5300 10.5.1.30:80<BR> LocalForward 5322 10.5.1.30:22<BR> LocalForward 5343 10.5.1.30:443<BR><BR><BR>As you can see this would have required a horrendously long list of<BR>-L lport:rhost:rport options.<BR><BR>Check the man page for ssh. Make note of the difference between -L<BR>which opens ports on the local side vs -R which opens ports on the<BR>remote side.<BR><BR>I'll have to give
the -D option a try when I get a chance.<BR><BR>Claude<BR><BR></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>