Blog personal de Anibal Copitan como usuario Linux y creador de software. Contenido sobre herramientas y programación.
¿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 Aníbal 🐧💻. ¿Tienes una gran Idea/Proyecto? Si me gusta, ¡trabajemos juntos!
¿Tienes un proyecto en mente o necesitas resolver un desafío técnico? Estoy aquí para ayudarte a encontrar la mejor solución. 🚀
Hablemos sobre tu proyecto ¡Necesito una consulta rápida!
No hay comentarios:
Publicar un comentario