Skip to content

Instantly share code, notes, and snippets.

@gnat
Last active January 6, 2023 16:19
Show Gist options
  • Save gnat/4fa5f0eca350cb725860b9844b5f852b to your computer and use it in GitHub Desktop.
Save gnat/4fa5f0eca350cb725860b9844b5f852b to your computer and use it in GitHub Desktop.
Server / Ubuntu SSH quickstart changme.

Setup SSH

  • sudo apt install ssh curl -y
  • mkdir -p ~/.ssh; curl https://github.com/gnat.keys >> ~/.ssh/authorized_keys; chmod 600 ~/.ssh/authorized_keys
  • sudo echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
  • sudo systemctl reload ssh

You can now use ssh to do a proper setup.

This is can also be done at install time in the Ubuntu Server GUI.

Upload some files

  • rsync -axvz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p22" --progress ./* [email protected]:/home/USER/Desktop/uploaded/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment