Don Marti

Mon 20 May 2013 08:01:07 PM PDT

What does ssh -t do?

Using the -t option allocates a pseudo-terminal for ssh. This comes in handy when you want to "double ssh".

Let's say you can reach the host bastion and bastion can reach internal but you can't reach internal. No problem, right? You can log into internal like this:

ssh bastion ssh internal

No joy: "Pseudo-terminal will not be allocated because stdin is not a terminal."

Now try that again with -t...

ssh -t bastion ssh internal

And it works.