Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save developerprofiles/a301c2ca216108410f134cff5384ec14 to your computer and use it in GitHub Desktop.
Save developerprofiles/a301c2ca216108410f134cff5384ec14 to your computer and use it in GitHub Desktop.
How to install SSH Keys for authentication without password
# Create ssh private and public keys on your local machine
ssh-keygen -t rsa
# Set permissions on your private key
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
# Copy the public key to the server
scp ~/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys
# On the server, set permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
# If you have SELinux enabled and your SSH Keys will not work
# try running the following command
restorecon -v /root/.ssh/authorized_keys
# If you want to turn SELinux off, while system is running
echo 0 > /selinux/enforce
# You can also turn SELinux off by updating config file
vi /etc/selinux/config
# and change
SELINUX=enforcing
# to
SELINUX=disabled
@dorene12rock
Copy link

Hi. I sent a message as issue to you yesterday (to developerprofile account, I guess it yours). I have a question about a repository that you have forked. I am going to delete my github account (not this account) but you (and other users) have forked my repository. If I ask, would you delete the repository? If you reply this comment can write what repository that would you delete. Looking forward to your reply because it's important for me. Thx.

@dorene12rock
Copy link

Hello. Why don't you reply this comment? Please reply if you see this. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment