Skip to content

Instantly share code, notes, and snippets.

@aleozlx
Last active November 20, 2018 07:28
Show Gist options
  • Select an option

  • Save aleozlx/8ab4b3e40da69e1fdf686b6b87cd2cfc to your computer and use it in GitHub Desktop.

Select an option

Save aleozlx/8ab4b3e40da69e1fdf686b6b87cd2cfc to your computer and use it in GitHub Desktop.
mkdir -p /root/.ssh
echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIxMOh1s9+bMx+BrsZ9gnvUeMXfTYP2pYM96weaZ+GUl alex@ansible.3cv-research.com' >> /root/.ssh/authorized_keys
echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH28Ycjjv1L+BVsycPK/gTittc3Xv9ENpAOPfkfM20dy alex@latitude-5289' >> /root/.ssh/authorized_keys
chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys
sed -i -e 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl restart sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment