0

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.

CIsForCookies
  • 12,097
  • 11
  • 59
  • 124
  • When you say you did `-tt`, was that for C? Should probably be `ssh -t B "ssh C". What do you get with `-v` ? – jhnc Feb 06 '19 at 08:41
  • 1
    You probably should have stayed on [Ask Ubuntu](http://askubuntu.com/). "Double hop" machines are usually (often?) called "jump boxes". Also see questions like [SSH into remote host using jump box](https://serverfault.com/q/909026/145545) on [Server Fault](http://serverfault.com/). Jump boxes usually refer to a machine in the DMZ. They are not limited to SSH. They show up in Windows networks with the RDP protocol, too. – jww Feb 06 '19 at 12:43

1 Answers1

-1

This works for me:

ssh -t user_B@ip_B "ssh -t user_C@ip_C"
jvdmr
  • 685
  • 5
  • 12