Skip to content

Instantly share code, notes, and snippets.

@ma1onso
Last active June 5, 2018 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ma1onso/a1af13930e59b2e8682ea21d14359691 to your computer and use it in GitHub Desktop.
Save ma1onso/a1af13930e59b2e8682ea21d14359691 to your computer and use it in GitHub Desktop.
how to configure pem file
Nota: Todos estos pasos se deben hacer antes de bloquear el acceso con contraseña al servidor.
Pasos para crear deploy keys y fichero .pem:
ssh-keygen -t rsa -b 4096
cd ~/.ssh && openssl rsa -in id_rsa -outform pem > test.pem
cat id_rsa.pub >> authorized_keys
Referencia: https://thepracticalsysadmin.com/set-up-pem-key-authentication/
Descargar fichero .pem a local:
scp -v USER@HOST:/home/USER/.ssh/test.pem /home/LOCAL_USER/
Cambiar permisos por unos más restringidos: chmod 400 test.pem
Probar conexión: ssh -i test.pem USER@HOST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment