Guest User

Untitled

a guest
Jun 5th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. require 'net/ssh'
  2.  
  3. ssh_opts = {
  4. :host_name=>"19.09.20.18",
  5. :user=>"manual-ace",
  6. :password=>"42bike24",
  7. :port=>1800,
  8. :auth_methods=>["password"],
  9. }
  10.  
  11. Net::SSH.start(nil, nil, ssh_opts) do |ssh|
  12. psw = "TEst$1234".encode("UTF-8")
  13. p ssh.exec!("ruby path/to/receiver.rb #{psw}")
  14. end
  15.  
  16. ARGV.each do |my_str|
  17. p my_str # OUTPUT: "TEst234"
  18. end
Add Comment
Please, Sign In to add comment