Skip to content

Instantly share code, notes, and snippets.

@brcolow
Created September 23, 2016 06:55
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 brcolow/d33146ae79f5ba9171b43e327c493e4e to your computer and use it in GitHub Desktop.
Save brcolow/d33146ae79f5ba9171b43e327c493e4e to your computer and use it in GitHub Desktop.
setup.sh
#!/bin/bash
[ ! -e ~/.ssh/id_rsa ] || [ ! -e ~/.ssh/id_rsa.pub ] && ssh-keygen -b 1024 -t rsa -N '' -f ~/.ssh/id_rsa
sed -i -r 's/^#?(PermitRootLogin|PermitEmptyPasswords|PasswordAuthentication|X11Forwarding) yes/\1 no/' /etc/ssh/sshd_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment