[TriLUG] sftp/ssh to boxes behind a firewall

David Brain dbrain at gmail.com
Wed Apr 4 08:40:10 EDT 2007


This may not be the best way, but if you are already familiar with
setting up vnc over ssh, there's nothing stopping you setting up ssh
over ssh.

e.g. set up a tunnel through the external machine:
             ssh -L 2222:192.168.1.55:22 your.external.machine

where 192.168.1.55 is the IP of your internal box.  Then you can just
ssh/scp/sftp to localhost on  port 2222 and you'll be connected to
your internal box.

Not all that efficient as everything gets encrypted twice, but it
works - did this for a while while my home external box was a WRT so
couldn't do a two step copy for file transfer.

David.

On 4/4/07, Roy Vestal <rvestal at trilug.org> wrote:
> I'm looking for the best/easiest way to do this.
>
> I have a few machines behind my firewall at home. I have 1 port setup
> for ssh/sftp to one machine. However, i have a second machine I need to
> get to from time to time.
>
> Currently, I ssh to machine 1, then have to ssh to machine 2. Is there
> anyway, using ssh to create a kind of tunnel like I can with vnc over
> ssh, that will allow me to directly ssh/sftp to the second machine?  For
> example, if I have a document on machine 2, I currently ssh to machine
> 1, sftp the document from machine 2 to machine 1, then sftp the document
> from machine 1 to the workstation I'm on. Is there a better/easier way
> that is still using ssh/sftp?
>
> TIA,
> Roy
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list