Skip to content

Instantly share code, notes, and snippets.

@adamshamsudeen
Created March 27, 2020 14:12
Show Gist options
  • Save adamshamsudeen/d50c4776d5c3e7c4416ab6203399dc5a to your computer and use it in GitHub Desktop.
Save adamshamsudeen/d50c4776d5c3e7c4416ab6203399dc5a to your computer and use it in GitHub Desktop.
ssh keys generation
> on the local server do the following:
mkdir ~.ssh
chmod 750 ~
chmod 700 ~/.ssh
ssh-keygen -t rsa -b 2048
cat id_rsa_<server_name>.pub
> On the remote server do the following:
mkdir ~.ssh
chmod 750 ~
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
edit the ~/.ssh/authorized_keys and paste in the contents of the *.pub file from the local server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment