From: Roger Pack on
Anybody know how to pass a password to ssh?

with this:


require 'open3'
stdin, stdout, stderr, thread_on_doze = Open3.popen3 'ssh user(a)host'


ssh somehow appears to bypass and still require the password from the
terminal [?]
Thanks.
-rp
--
Posted via http://www.ruby-forum.com/.

From: Joel VanderWerf on
Roger Pack wrote:
> Anybody know how to pass a password to ssh?
>
> with this:
>
>
> require 'open3'
> stdin, stdout, stderr, thread_on_doze = Open3.popen3 'ssh user(a)host'
>
>
> ssh somehow appears to bypass and still require the password from the
> terminal [?]
> Thanks.
> -rp

Dunno. Maybe use pty?

Have you ruled out key-based authentication?

From: Ivan Evtuhovich on
Hello,

Why don't you use Net::SSH

On Apr 7, 3:25 am, Joel VanderWerf <joelvanderw...(a)gmail.com> wrote:
> Roger Pack wrote:
> > Anybody know how to pass a password to ssh?
>
> > with this:
>
> > require 'open3'
> > stdin, stdout, stderr, thread_on_doze = Open3.popen3 'ssh user(a)host'
>
> > ssh somehow appears to bypass and still require the password from the
> > terminal [?]
> > Thanks.
> > -rp
>
> Dunno. Maybe use pty?
>
> Have you ruled out key-based authentication?

From: Joel VanderWerf on
Ivan Evtuhovich wrote:
> Why don't you use Net::SSH

One reason not to use Net::SSH is that IIUC it doesn't use the config
file of ssh, which can be used to define hosts, tunnels, proxies,
control sockets, etc. (I hope I'm wrong about that...)

From: Brian Candler on
Joel VanderWerf wrote:
> Ivan Evtuhovich wrote:
>> Why don't you use Net::SSH
>
> One reason not to use Net::SSH is that IIUC it doesn't use the config
> file of ssh, which can be used to define hosts, tunnels, proxies,
> control sockets, etc. (I hope I'm wrong about that...)

By default it uses .ssh/config, but you can tell it not to if you don't
want it. You can also set up tunnelling and the like programatically in
Ruby.
--
Posted via http://www.ruby-forum.com/.