Skip to content

Instantly share code, notes, and snippets.

@lyret
Created August 10, 2017 12:05
Show Gist options
  • Save lyret/ae048119e0114fe796d840c4240df890 to your computer and use it in GitHub Desktop.
Save lyret/ae048119e0114fe796d840c4240df890 to your computer and use it in GitHub Desktop.
Replace a SSH key on a linux server
sed -i '\|OLDKEY|d' .ssh/authorized_keys && echo "NEWKEY" >> .ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment