1
1
I have a machine called ic
that I can ssh to. There is another machine, fw
, that is on a completely different VLAN, and I cannot talk to it. ic
is on both my VLAN and the VLAN that fw
uses, and so my usual procedure for sshing to fw is to ssh into ic
and from there ssh into fw
. If I wanted to script this action, however, how could I get it to work?
I tried ssh root@ic "ssh root@fw"
, but this results in the message Pseudo-terminal will not be allocated because stdin is not a terminal
, and then I get three messages from fw
, presumably because it has null input:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
What's the best way to script this?
True, I don't need to be root on
ic
. Thanks! – Matthieu Cartier – 2011-07-15T09:53:43.080Excellent answer. The local tunnel option allowed me to scp and git over a gateway, for which I continuously got the error messages in the question, and no other solution worked. Thanks! – Yuval – 2012-05-25T20:21:29.540
FWIW you can do the same with putty, which also uses the
-t
option. – congusbongus – 2013-02-10T23:48:25.350