Based on question Key based authenication with net-sftp in Ruby, I can SFTP with key-based authentication using the following:
Net::SFTP.start(host, "user", keys:['~/.ssh/my_key']) do |sftp|
sftp.upload! "/local/file.tgz", "/remote/file.tgz"
end
But I can't get this to work for keys that require a passphrase -- I just get prompted for the user login on that host. Am I missing something to pass in that would let me enter the passphrase for my key? Or do I need to just stick with ssh-agent
for this?