0
require 'net/sftp'
Net::SFTP.start('ip', 'user', :keys => ['/home/user/.ssh/id_rsa.pub', '/home/user/.ssh/id_rsa'], :password => 'password', :port => 30) do |sftp|
puts 'connected'
end
Net::SFTP.start('ip', 'user', :password => 'password', :port => 30) do |sftp|
puts 'connected'
end
,但沒有工作..
什麼是做這種正確的方法是什麼?