In using ssh to execute a command (rather than open a shell), as ssh remotehost command
I notice that some commands work fine like: ls, who, .. but some others like: top -n1 give a gripe like: TERM environment variable not set and even if I set TERM with, say ssh remotehost TERM=xterm top -n1 then it gripes like this: top: failed tty get Now, I find that the problem goes away when I add the ssh -t option which "forces use of a pseudo-tty" ssh -t remotehost top -n1 I'm supposing that programs which merely stream output to stdout (and/or stderr) work ok (ssh just captures stdout & stderr via one of the popen variants). But programs that need termio/termcap (eg top) don't work without a pseudo-tty. Am I warm? Regards, ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
