Brian Stempin on 8 Aug 2010 23:32:38 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] "ssh -X" through multiple hops

  • From: Brian Stempin <brian.stempin@gmail.com>
  • To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
  • Subject: Re: [PLUG] "ssh -X" through multiple hops
  • Date: Mon, 9 Aug 2010 02:32:32 -0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=c94hm6c6WqjtIFQSRMMWJkXfV/bim67dy6ifrc+6z+I=; b=qg+atZRcrhjc/iA6CTiv1tx9JBKW6lErBodJGGPJOvR13Ip1nLZVjmU7ltjwBOczvf EXEGCiLddrc2uivnklqKnA/4W50BEEh9cxN5s4v9rpk0Ah3ZpmNvZ7Eo1/i+uv+sVFJw 8L+3ZnRyHN0ChlmI8H4dzhLD4MPTw9nNuWXWQ=
  • Reply-to: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
  • Sender: plug-bounces@lists.phillylinux.org

You can use ssh port forwarding to forward a port on your local computer to your ssh port on the box inside of your firewall.

Example:
me@somewhere >ssh -L 8080:boxinsidehome:22 me@firewall

This forwards port 8080 on your local machine through your firewall to port 22 on 'boxinsidehome'.  From there, you can:
me@somewhere >ssh -X me2@localhost -p 8080

This last line initiates an SSH connection directly with 'boxinsidehome' over the SSH tunnel that we established from the first example. You could throw in any other SSH options that you might normally use, such as compression, etc etc.

HTH,
Brian
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug