From: Thomas Date: 2006-09-16T00:40:59+09:00 Subject: Re: Ruby + SSH + Sudo Rick DeNatale wrote: > On 9/8/06, Alex LeDonne wrote: >> On 9/7/06, Matt Rose wrote: >> > there is a way to pass the password in using sudo. I forget the >> > syntax but the man page should have it. If you're still curious >> > tomorrow, I'll dig up some code I wrote to do exactly this. >> > >> > Matt >> >> On my system, according to man sudo, -S causes sudo to read the >> password from STDIN. > > Yep, missed that one. > > So: > > echo secretPasswd | ssh -S command... > > should do the trick > And hope no one does a ps -a at the time and get account pwd. Might be best to use separate account with sudo privs without need of pwd. Just my 0.02 cents