Skip to content

Instantly share code, notes, and snippets.

@iamdylanngo
Last active March 11, 2020 02:07
Show Gist options
  • Select an option

  • Save iamdylanngo/033b387498566e3268e88710d9e0439e to your computer and use it in GitHub Desktop.

Select an option

Save iamdylanngo/033b387498566e3268e88710d9e0439e to your computer and use it in GitHub Desktop.
openssh-centos
# 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