Take the 2-minute tour ×  I have three Computers.  PC1 and PC2
is on a private LAN, where PC1 is known to PC2 as  PC2 and PC3
is on a another LAN, where PC2 is known to PC3 as  How can I
connect to PC1 from PC3 with SSH.  Is there something like:  ssh
user@ -via user@ share|improve this question add comment  4
Answers  up vote 15 down vote accepted ssh -o 'ProxyCommand nc
%h %p'  Best used through an alias in ~/.ssh/config:  Host PC1
User user ProxyCommand ssh user@ nc %h %p  Then you can simply
run ssh PC1.  share|improve this answer +1 Yep, and I have a
similar answer
stackoverflow.com/questions/1010808/1122282#1122282 with some
more details. –  ephemient Sep 15 '10 at 21:51 needed to install
netcat –  Stefan Sep 21 '10 at 10:11 add comment  Using SSH
there is a clear solution:    1. on your local machine set up
your ~/.ssh/config such that it has the following:      host
WhatYouWillCallTheConnection         hostname
the.gateway.server.address.com         user
YourUsernameOnTheGateway   2. On both the gatew