I'm trying to connect to machine one with ssh and then connect to another machine two with ssh, but I get this error.
ssh firstname.lastname@example.org 'ssh email@example.com' stdin: is not a tty
By default, when you run a command on the remote machine using ssh, a TTY is not allocated for the remote session. This lets you transfer binary data, etc. without having to deal with TTY quirks. This is the environment provided for the command executed on
However, when you run ssh without a remote command, it DOES allocate a TTY, because you are likely to be running a shell session. This is expected by the
If you want a shell on
This is typically appropriate when you are eventually running a shell or other interactive process at the end of the ssh chain. If you were going to transfer data, it is neither appropriate nor required to add
It's expecting an interactive terminal on a tty device on the intermediate server.
If you try this command, it should work:
There's a better way to use SSH as a relay: use the