when i don't use -t option, error message keep in stderr when i use -t option, error message was sent into stdout how to reproduce walkerxk@ubuntu:~$ ssh 127.1 ls -d $(mktemp -u) 2>/dev/null walkerxk@ubuntu:~$ ssh -t 127.1 ls -d $(mktemp -u) 2>/dev/null ls: cannot access '/tmp/tmp.tckToRNwR7': No such file or directory walkerxk@ubuntu:~$
-t also change \n to \r\n: walkerxk@ubuntu:~$ echo -e 'a\nb' >test walkerxk@ubuntu:~$ ssh 127.1 cat test|xxd 00000000: 610a 620a a.b. walkerxk@ubuntu:~$ ssh -t 127.1 cat test|xxd 00000000: 610d 0a62 0d0a a..b.. walkerxk@ubuntu:~$
(In reply to walkerxk@gmail.com from comment #1) > -t also change \n to \r\n: That's a function of the client's terminal's "cooked" mode. If you don't want it to do that you need to tell it to use "raw" mode. $ stty raw $ ssh -t 127.1 cat test|xxd 00000000: 610a 620a a.b. $ ssty cooked $ ssh -t 127.1 cat test|xxd 00000000: 610d 0a62 0d0a a..b..
thanks, stty -opost will fix it.
OpenSSH 9.3 has been released. Close resolved bugs