, , , "ssh -t www.foo.com" sudo ls -l " , grepping " foo ". , .
.
, . ,
$ ssh -t user @host 'sudo ls -l /' | grep 'root' user @host password: <===== Then he expects the user to enter the password for the user sudo. The connection to the host is closed. drwxr-xr-x 2 root root 4096 2011-08-31 15:33 bin dr-xr-xr-x 24 root root 4096 2014-07-14 00:52 bldmnt dr-xr-xr-x 2 root root 4096 2011 -03-23 15:51 blr drwxr-xr-x 3 root root 4096 2011-08-31 15:36 boot,,.
Try it and see if this works for you.
source
share