Last active
June 5, 2018 15:56
-
-
Save ma1onso/a1af13930e59b2e8682ea21d14359691 to your computer and use it in GitHub Desktop.
how to configure pem file
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
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