Created
September 25, 2014 16:23
-
-
Save hammackj/8ea7c448c6f197f61c91 to your computer and use it in GitHub Desktop.
Simple Ubuntu / Debian Patcher, relies on authorized keys being setup correctly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Jacob Hammack <jacob.hammack@hammackj.com> | |
require 'net/ssh' | |
HOSTS = | |
[ | |
"", | |
] | |
HOSTS.each do |host| | |
Net::SSH.start(host, 'root') do |ssh| | |
ssh.exec "apt-get update" | |
ssh.exec "apt-get upgrade -y" | |
ssh.exec "apt-get autoremove" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment