Executing Password Change over Ruby Net-SSH

Posted by tesmar on Stack Overflow See other posts from Stack Overflow or by tesmar
Published on 2010-05-20T03:42:37Z Indexed on 2010/05/20 3:50 UTC
Read the original article Hit count: 291

Filed under:
|

Hi all,

I am looking to execute a password change over Net-ssh and this code seems to hang:

Net::SSH.start(server_ip, "user", :verbose => :debug ) do |session|

  session.process.popen3("ls") do |input, output, error|

    ["old_pass","test", "test"].each do |x|

        input.puts x

    end

  end

end

I know the connection works because using a simple exec I can get the output from ls on the remote server, but this hangs.

Any ideas?

The last message from debug is that the public key succeeded.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about net-ssh