Blog personal de Anibal Copitan. Herramientas y contenido de desarrollo, Linux, terminal, programación. Mejora tus habilidades tecnológicas.
¿Listo para aprender más? Contáctame por WhatsApp
sábado, 29 de enero de 2022
How to access local server without password
How to connected to a server with ssh without password. This objective can be repetitive for to remember many password for each ssh access.
We will save time for access to easily. Also you can access to another co Worker without giving you the password.
When you want to remove the access to user. You don't need to change the login
password of the server.
You only to have to remove the string key public
from user that file is called authorized_keys.
Step 1: Create Your ssh key like client
You must be the next command: This generated your keys (a private key and a
public key)
this files will be created into the folder: /home/user/.ssh/
ssh-keygen
Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Created directory '/home/user/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user/.ssh/id_rsa. Your public key has been saved in /home/user/.ssh/id_rsa.pub. The key fingerprint is: 8c:2a:ed:82:98:6d:12:0a:3a:ba:b2:1c:c0:25:be:5b
Step 2: Add the public key in Server
sudo apt install openssh-server
nmap 192.168.1.62
ssh-copy-id -i ~/.ssh/id_rsa.pub pi@raspberrypi
pi@raspberrypi's password: ******** Now try logging into the machine, with "ssh 'username@remoteserver'", and check in: ~/.ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting.
ssh pi@raspberrypi
Reference: www.shellhacks.com
Soy experto en Linux 🐧, desarrollo web 💻, aplicaciones móviles 📱, redes 🌐 y ciberseguridad 🔐
¿Listo para dar el siguiente paso con tu proyecto? ¡Contacta conmigo por WhatsApp ahora y empecemos a trabajar juntos! 🚀
¡Quiero contratar tu asesoría personalizada! ¡Necesito ayuda urgente para mi proyecto! ¡Quiero empezar mi proyecto contigo!
No hay comentarios:
Publicar un comentario