diff --git a/lib/vagrant/ssh/session.rb b/lib/vagrant/ssh/session.rb index 022c427a2..6c63a8c3e 100644 --- a/lib/vagrant/ssh/session.rb +++ b/lib/vagrant/ssh/session.rb @@ -32,7 +32,7 @@ module Vagrant # of `sudo`. def sudo!(commands, options=nil, &block) session.open_channel do |ch| - ch.exec("sudo -i sh") do |ch2, success| + ch.exec("sudo sh -l") do |ch2, success| # Output each command as if they were entered on the command line [commands].flatten.each do |command| ch2.send_data "#{command}\n"