Created
May 1, 2016 20:49
-
-
Save nurulimamnotes/8aaf00709d5ea9715fc4fb1b0c4e56fa to your computer and use it in GitHub Desktop.
Setup Private Key SSH Login & Change Default Port
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
ssh-keygen -b 2048 -t rsa | |
chmod 700 .ssh | |
mv .ssh/id_rsa.pub .ssh/authorized_keys | |
chmod 600 .ssh/authorized_keys | |
cat .ssh/id_rsa | |
rm -rf .ssh/id_rsa | |
nano /etc/ssh/sshd_config | |
service sshd restart | |
ssh -i private-key -p 7777 root@hostname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment