Skip to content

Instantly share code, notes, and snippets.

@dhb52
Last active April 3, 2019 01:04
Show Gist options
  • Select an option

  • Save dhb52/634ab413331aa918f6b564aa085cf76d to your computer and use it in GitHub Desktop.

Select an option

Save dhb52/634ab413331aa918f6b564aa085cf76d to your computer and use it in GitHub Desktop.
setup ssh login

cp pub key on to server using scp

on server

mkdir ~/.ssh
chmod 700 ~/.ssh

on client

scp -p ~/.ssh/id_rsa.pub <user>@centos:/home/<user>/.ssh/authorized_keys

Make sure authorized_keys with file mode 600 (chmod 600 ~/.ssh/authorized_keys)

Turn off ssh UseDNS config on server side (VM server) faster login

OpenSSH Slow: Hanging at SSH2_MSG_SERVICE_ACCEPT received

$ vi /etc/ssh/sshd_config
UseDNS no
$ service sshd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment