Is ssh supposed to run commands in terminal?

Yuri yuri at rawbw.com
Sat Apr 18 08:55:33 AEST 2015


On 04/15/2015 00:49, Christian Kandeler wrote:
>
> -o RequestTTY=yes


Thanks, this works.

However, with this option ssh alters the output of all commands: it adds 
CR=0x0d in front of every NL=0x0a. This doesn't happen without this option.
Why is sshd adding CR?

I think the only effect of running in the terminal is the term flag that 
the process sees on the stdin and stdout (in shell it is [ -t 1 ]). The 
process is supposed to detect the terminal caps and print the output 
accordingly.

I even verified that this is sshd is doing it and not the cat command by 
writing the C program printing newlines.

Yuri


More information about the openssh-unix-dev mailing list