Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pearkes
Created December 6, 2012 22:57
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 pearkes/4229244 to your computer and use it in GitHub Desktop.
Save pearkes/4229244 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Run as root (sorry mom) like this: curl http://gist/test.sh | sed 's/defaulthost/pablo/g' | sudo sh
# This basically turns on ssh and sets a new hostname.
scutil --set HostName defaulthost
echo "Succesfully changed hostname to `hostname`"
echo "Enabling SSH access.."
systemsetup -setremotelogin on
echo "Succesfully enabled SSH access..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment