[X-Unix] ssh sudo password in clear text

Paul Hess hess at yacht.com
Sun Jun 10 14:50:51 PDT 2007


On Jun 10, 2007, at 4:45 PM, Eric F Crist wrote:

> On Jun 10, 2007, at 3:01 PMJun 10, 2007, Paul Hess wrote:
>>
>> On Jun 10, 2007, at 3:41 PM, Eric F Crist wrote:
>>
>>> On Jun 10, 2007, at 2:12 PMJun 10, 2007, Paul Hess wrote:
>>>
>>>>
>>>>    ssh someserver.com sudo mailstuff/sa-learn.sh
>
[...]
> just any user on the system, if that makes you feel better.  If,  
> however, you still want to execute the command while supplying the  
> password yourself, a command such as this should work:
>
> echo "password" | ssh someserver.com sudo mailstuff/sa-learn.sh

Hi Eric,

Here's the rub that brings me back to square one (unless I  
misunderstand the piping).

If I use the command above, wouldn't the password be sent to "ssh"  
rather than sent to the "sudo" command?  I think I somehow need to  
put echo "password" into the command line after ssh to be piped to  
sudo but I don't understand the syntax to do that.  I believe it has  
to do with single quotes but I can't find a way to get it right.

                      - Paul



More information about the X-Unix mailing list