Is ssh supposed to run commands in terminal?

Christian Kandeler christian.kandeler at theqtcompany.com
Wed Apr 15 17:49:06 AEST 2015


On 04/15/2015 08:48 AM, Yuri wrote:
> 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.

-o RequestTTY=yes

I think users intuitively expect commands to be run in
> terminal.
> Is something broken with my ssh setup?
>
> ssh on FreeBSD 10.1
>
> Yuri
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



More information about the openssh-unix-dev mailing list