Skip to content

Instantly share code, notes, and snippets.

View Xosmond's full-sized avatar
🏠
Working from home

Jordano Moscoso Xosmond

🏠
Working from home
View GitHub Profile
@ainoya
ainoya / remote_sudo.rb
Created June 13, 2013 00:40
Execute remote sudo command with net-ssh
#!/usr/bin/env ruby
require 'net/ssh'
require 'highline/import'
def get_password
ask( "Enter Password: " ) {|q| q.echo = '*'}
end
def remote_sudo host, ssh_user, command, opts={}