Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'net/ssh'
- ssh_opts = {
- :host_name=>"19.09.20.18",
- :user=>"manual-ace",
- :password=>"42bike24",
- :port=>1800,
- :auth_methods=>["password"],
- }
- Net::SSH.start(nil, nil, ssh_opts) do |ssh|
- psw = "TEst$1234".encode("UTF-8")
- p ssh.exec!("ruby path/to/receiver.rb #{psw}")
- end
- ARGV.each do |my_str|
- p my_str # OUTPUT: "TEst234"
- end
Add Comment
Please, Sign In to add comment