Skip to content

Instantly share code, notes, and snippets.

@sheedy
Created September 19, 2013 03:46
Show Gist options
  • Save sheedy/6618870 to your computer and use it in GitHub Desktop.
Save sheedy/6618870 to your computer and use it in GitHub Desktop.

ubuntu setup

(tested with 12.04 LTS)

ssh root@aaa.bbb.ccc.ddd

export DEBIAN_FRONTEND=noninteractive
apt-get -qq -y update && apt-get -qq -y dist-upgrade

adduser cowboy && adduser cowboy sudo

nano /etc/ssh/sshd_config

### change
Port ????
PermitRootLogin no
### add at end
UseDNS no
AllowUsers cowboy
### done

reload ssh

new terminal tab

ssh-copy-id aaa.bbb.ccc.ddd && ssh aaa.bbb.ccc.ddd
sudo date
# if it works, root tab may be closed safely
bash -c "$(curl -fsSL https://bit.ly/cowboy-dotfiles)" && source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment