Skip to content

Instantly share code, notes, and snippets.

@yalin
Created February 27, 2021 06:09
Show Gist options
  • Save yalin/0e9d62e423e351cb8d01aac25cec19e7 to your computer and use it in GitHub Desktop.
Save yalin/0e9d62e423e351cb8d01aac25cec19e7 to your computer and use it in GitHub Desktop.
ssh after digital ocean droplet
  1. Create your local ssh key using ssh-keygen
  2. Copy ~/.ssh/id_rsa.pub to digital ocean my profile > security
  3. Create droplet with added ssh key
  4. Droplet dashboard > Access > Reset root password
  5. Email will come with root password
  6. Droplet dashboard; on right top there is "Console" to server
  7. Enter the root password you copied from e-mail
  8. Create a new password
  9. Local terminal; ssh-copy-id -i id_rsa.pub YOUR_SERVER_IP creates known hosts file under .ssh/
  10. If ssh key correct you can continue, if not;
  11. ssh-keygen -R YOUR_SERVER_IP puts correct ssh (the one you put in digital ocean profile secutiry) into your known_hosts file
  12. Now you can login with ssh root@YOUR_SERVER_IP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment