sábado, 17 de septiembre de 2016

ssh login using putty key gen


1) Generas tus claves clave publica y privada (putty Key gen)
2) Copia el contenido de tu llave publica en ~/.ssh/authorized_keys
3) Reinicia el servicio sudo service sshd restart
4) Editar  /etc/ssh/sshd_config

# What ports, IPs and protocols we listen for

Port 22


# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes


# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no


5) Usa tu llave privada para acceder a tu servidor remoto
6) Nota (PermitRootLogin no)  no te dejara loguearte al servidor usando el usuario root, lo cual es   bn seguro, puedes loguearte con otro usuario y luego  acceder a root usando el comando sudo 



Within that file, find the line that includes PermitRootLogin and modify it to ensure that users can only connect with their SSH key:
PermitRootLogin without-password
# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

No hay comentarios:

Publicar un comentario