ssh client option "-T" is Disable pseudo-terminal allocation.

If I turn on this option, the remote sshd will not allocate a pty to run remote command. How the output of remote command transfer back to ssh client? As I know that the simple input/output between ssh client and server is:

ssh client <--- (TCP/IP) --> ssh server <---> ptm <---> pts <---> remote command

With option -T, does it means that the sshd will not create pty pairs to run remote command?

1 Answer 1


If you turn pty allocation off with -T, sshd will use a pair of pipes instead of a bi-directional pty to communicate with the process running the remote command.

You can have a look at the do_exec_no_pty() function in OpenSSH source code if that isn't documented anywhere. dropbear (another sshd implementation) is doing something similar.

In the case where a pty is allocated (-t option or no remote command specified), only a single pty will be allocated on the remote machine; the client ssh will not allocate a pty on the local machine; it will simply turn the raw mode on its stdin, if that's a tty.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .