Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'net/ssh'
- host = "abc.de"
- user = "user_xy"
- pass = "user_pass"
- begin
- Net::SSH.start(host, user, :password => pass) do |ssh|
- $a = ssh.exec! "cd xy_dir && php abc.phar do_this"
- ssh.close
- puts $a
- end
- rescue
- puts "Unable to connect to #{host}."
- end
Add Comment
Please, Sign In to add comment