Created
March 27, 2020 14:12
-
-
Save adamshamsudeen/d50c4776d5c3e7c4416ab6203399dc5a to your computer and use it in GitHub Desktop.
ssh keys generation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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