Using a password with Net::SFTP
To ignore your private key when trying to make an sftp connection using a password with Net::SFTP, specify only the password authentication method like so:
Net::SFTP.start('sftp.foo.com', 'user', :password => 'pass', :auth_methods => ["password"]) do |sftp|
# do stuff
end
(Source: net-ssh.rubyforge.org)