ssh to a remote server via gateway server

Mikkel L. Ellertson mikkel at infinity-ltd.com
Sat May 31 00:14:07 UTC 2008


Cameron Simpson wrote:
> On 30May2008 08:31, Mikkel L. Ellertson <mikkel at infinity-ltd.com> wrote:
>> lux wrote:
>>> I'm not sure that Mikkel's solution will work:
>>> "Pseudo-terminal will not be allocated because stdin is not a terminal"
>>> will be the error message.
>>>
>> You can try adding the -t option to the command to run on PC A.
> 
> I missed the start of this thread, but you can use the ProxyCommand ssh
> option to hop through multiple servers, keeping the "top level" ssh
> nicely connected to your terminal and the endpoint (via the proxycommand
> tunnel). Which may solve the -t option issue.
> 
> I have a script called "sshto" that does exactly this for multihop ssh
> connections. Very handy, especially since you can make "sshto" the
> default transport for rsync, letting you do multihop rsyncs easily:
> 
>   rsync some-dir/ host1\!host2\!host3:some-other-dir/
> 
> (You will need the \! on the command prompt line instead of plain ! to
> avoid your shell's history substitution syntax - a shell script does
> not need the annoying sloshes).
> 
> Cheers,
It sounds like you have experience with what he is trying to do, so 
please continue to advice the OP. What he is does now is ssh to PC 
A, and then ssh to PC B. What he wants to ssh to PC B in one 
command, but he has to go through PC A. (firewall machine?)

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/20080530/1f50c604/attachment-0001.sig>


More information about the fedora-list mailing list