CIsForCookies
CIsForCookies

Reputation: 12817

entering a double-hop machine using ssh

I'm trying to access machine C from my local machine (A). I have ssh-keys with B, which happens to have ssh-keys with C, so I'm trying to:

ssh -X user_B@ip_B "ssh -X user_C@ip_C"

but this doesn't connect (gave "Connection to ... closed." after about a minute), and also gives back:

Pseudo-terminal will not be allocated because stdin is not a terminal.

The error message is solved by adding -tt but I'm still stuck with no conection.

This works if I do the ssh in two steps, i.e. first, connect to B, and then, once I'm in B's terminal, connect to C...

Tried also this solution. Didn't work.

Upvotes: 0

Views: 306

Answers (1)

jvdmr
jvdmr

Reputation: 715

This works for me:

ssh -t user_B@ip_B "ssh -t user_C@ip_C"

Upvotes: -1

Related Questions