From: "Sandor Szücs" Date: 2008-07-22T22:30:00+09:00 Subject: Re: interacting with a shell script (ssh) On 22.07.2008, at 10:04, Une Bévue wrote: > ... ------8<------ > why such a difference ? Login without sending a password over the network by use of public/ private key method. Read wikipedia or other resources, there are really thousands of good ones. > obviously have tried also using net/ssh and net/scp (+Highline) with > ruby : > > require 'net/ssh' > require 'net/scp' > > Net::SSH.start("169.254.0.2", "root", :password => "", > :port => 2222) do |ssh| > ssh.scp.upload! "/mnt/fat", "/Users/yt/Desktop/scp_ESSAIS.txt" > end > > > here i got : > > Enter passphrase for /Users/yt/.ssh/id_dsa: > /opt/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh.rb:195:in > `start': root (Net::SSH::AuthenticationFailed) > from ./net-scp.rb:15 > > > then net/ssh is asking for the pass phrase althought it's given by > :password > > may be there is another option for the passphrase not being the > same as > :password ? According to http://net-ssh.rubyforge.org/ssh/v2/api/index.html the password option is not used as passphrase to open your private key. # :password => the password to use to login # :passphrase => the passphrase to use when loading a private key (default is nil, for no passphrase) regards, Sandor Szücs --