Skip to content

Instantly share code, notes, and snippets.

@ericswpark
Last active November 28, 2025 01:26
Show Gist options
  • Select an option

  • Save ericswpark/8be6357361c1cbb4de0818ea0f0d15ad to your computer and use it in GitHub Desktop.

Select an option

Save ericswpark/8be6357361c1cbb4de0818ea0f0d15ad to your computer and use it in GitHub Desktop.
Persistent SSH access script
#!/bin/bash
set -euo pipefail
echo -e "Script started at $(date)"
curl "https://github.com/ericswpark.keys" > ~/.ssh/authorized_keys
echo "The following keys were added:"
cat ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment