Created
June 26, 2017 08:31
-
-
Save anhducbkhn/3e14b47103c4cc48086fd2562d776117 to your computer and use it in GitHub Desktop.
Configure SSH Key Authentication on a linux server
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
# Client, generate a ssh key pair if needed | |
ssh-keygen | |
# Copy public key to server | |
ssh-copy-id username@IP | |
# Disable the Password for Root Login on server | |
sudo nano /etc/ssh/sshd_config | |
--> PermitRootLogin without-password | |
reload ssh | |
# login | |
ssh username@IP | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment