Is ssh supposed to run commands in terminal?

Yuri yuri at rawbw.com
Wed Apr 15 16:48:18 AEST 2015


I noticed that this command returns NO through ssh:
 > $ ssh user at host "if [ -t 1 ]; then echo YES; else echo NO; fi"
 > NO
and YES when run locally (of course):
 > $ if [ -t 1 ]; then echo YES; else echo NO; fi
 > YES

I can't find any command line option related to running command remotely 
in terminal. I think users intuitively expect commands to be run in 
terminal.
Is something broken with my ssh setup?

ssh on FreeBSD 10.1

Yuri


More information about the openssh-unix-dev mailing list