stty: invalid argument when using SSH

Will McDonald wmcdonald at gmail.com
Thu Nov 24 09:45:19 UTC 2005


On 23/11/05, Rhugga Harper <rhugga at gmail.com> wrote:
> I normally set the following in my .bashrc:
>
> stty erase '^H'
>
> When I login with an interactive session, everything is okay.
>
> However, when I connect to a remote host and execute a command via ssh, it
> complains:
>
> ssh -l someone somehost uptime
> stty: : Invalid argument
>  9:24am  up 32 day(s), 13:56,  5 users,  load average: 1.30, 1.52, 1.77
>
> Any tricks to suppresing this or resolving this problem?

It's because of pseudo-tty allocation. From "man ssh"

     -T      Disable pseudo-tty allocation.

     -t      Force pseudo-tty allocation.  This can be used to execute arbi-
             trary screen-based programs on a remote machine, which can be
             very useful, e.g., when implementing menu services.  Multiple -t
             options force tty allocation, even if ssh has no local tty.

$ ssh -qt -l someone somehost somecommand

Will work. There doesn't appear to be any way to configure this on a
per-host basis in ~/.ssh/config though.

Will.




More information about the redhat-list mailing list