Last active
March 11, 2020 02:07
-
-
Save iamdylanngo/033b387498566e3268e88710d9e0439e to your computer and use it in GitHub Desktop.
openssh-centos
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
| # Server | |
| yum -y install openssh-server | |
| cd .ssh | |
| ssh-keygen -t rsa | |
| mv ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys | |
| vi /etc/ssh/sshd_config | |
| # line 65: turn to [no] | |
| PasswordAuthentication no | |
| # line 69: make sure the value is [no] | |
| ChallengeResponseAuthentication no | |
| # line 96: make sure the value is [yes] | |
| UsePAM yes | |
| systemctl restart sshd | |
| # Client | |
| mkdir ~/.ssh | |
| chmod 700 ~/.ssh | |
| scp [email protected]:/home/cent/.ssh/id_rsa ~/.ssh/ | |
| ssh -i ~/.ssh/id_rsa [email protected] | |
| https://www.server-world.info/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment