Hi,

At Mon, 10 Feb 2003 11:15:43 +0900,
Vitaly Semkin wrote:
>  > scp2 ./file1 user@host:file1
> user@host's password:_

You may want to detach CTTY?

  # untested code
  popen("-", "r+") do |f|
    if f
      f.gets("password:")
      f.puts(password)
    else
      Process.setsid
      exec("scp2", file, host)
    end
  end

> And there's no way to provide the password as a command line
> argument. But I need to call this command out of a Ruby script, thus,
> I need to catch the command's output and give it the password.

It's insecure to pass a password as a command line.

-- 
Nobu Nakada