ssh to a remote server via gateway server

Mikkel L. Ellertson mikkel at infinity-ltd.com
Thu May 29 12:52:07 UTC 2008


lux wrote:
> Hi,
> I routinely login a remote server via a 'gateway' machine. For example, 
> I need to login to PC B using ssh. But this PC B is behind a 
> firewall.ssh port on PC A is open.
> 
> As a result, I have to login  PC A via ssh, then ssh PC B from PC A.
> 
> Is there ssh command line option that I can directly ssh to PC B?
> 
> Thanks
> Y
> 
You could try something like:

ssh [options] user at A "ssh [options] user at B"

You can skip the user@ part if you have the same user name.

ssh -Y PC_A "ssh -Y frank at PC_B"

Mikkel
-- 

   Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080529/c9ad3018/attachment-0001.sig>


More information about the fedora-list mailing list