From: brabuhr@... Date: 2006-08-29T00:42:15+09:00 Subject: Re: Ruby + SSH + Sudo > ------ > Net::SSH.start(host.name) do |session| > shell = session.shell.sync > shell.send_command("sudo ps -ef") > shell.exit > end > end > ------ > > So the code is locked to the send_command as the host is waiting me to > fill the password. But I don't find anyway of filling it. ".send_data" > doesn't work. > > Did I missed something ? The host is waiting for the ssh password or the sudo password? It may not meet your security requirements, but you could configure sudoers to allow that one user to run that small number of commands without a password: