Skip to content

Instantly share code, notes, and snippets.

@hammackj
Created September 25, 2014 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hammackj/8ea7c448c6f197f61c91 to your computer and use it in GitHub Desktop.
Save hammackj/8ea7c448c6f197f61c91 to your computer and use it in GitHub Desktop.
Simple Ubuntu / Debian Patcher, relies on authorized keys being setup correctly.
#!/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