Class: Net::SSH::Connection::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/ec2-starter/execution.rb

Instance Method Summary collapse

Instance Method Details

#sudo(password, command) ⇒ Object



145
146
147
# File 'lib/ec2-starter/execution.rb', line 145

def sudo(password, command)
  exec %Q%echo "#{password}" | sudo -S #{command}% 
end