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 <>
  • To: "Philadelphia Linux User's Group Discussion List" <>
  • 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;; 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 <>
  • Sender:

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.

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.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --