informatica:linux:ssh:login_intercambio_claves
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:linux:ssh:login_intercambio_claves [2013/12/23 08:16] – javi | informatica:linux:ssh:login_intercambio_claves [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Login por SSH por intercambio de claves | + | ===== Login por SSH por intercambio de claves ===== | 
| ssh keys exchange | ssh keys exchange | ||
| - | |||
| - | **ARTICULO A MEDIAS** | ||
| Quiero iniciar sesion desde ' | Quiero iniciar sesion desde ' | ||
| Line 10: | Line 8: | ||
| | maquina1 | usuario | | | maquina1 | usuario | | ||
| | maquina2 | usuario | | | maquina2 | usuario | | ||
| + | |||
| + | ==== Recomendada ==== | ||
| + | |||
| + | 1. (maquina1) Creamos las claves para el usuario ' | ||
| + | |||
| + | ssh-keygen -t rsa | ||
| + | |||
| + | Pulsamos ' | ||
| + | |||
| + | < | ||
| + | Generating public/ | ||
| + | Enter file in which to save the key (/ | ||
| + | Enter passphrase (empty for no passphrase): | ||
| + | Enter same passphrase again: | ||
| + | Your identification has been saved in / | ||
| + | Your public key has been saved in / | ||
| + | The key fingerprint is: | ||
| + | 3c: | ||
| + | The key's randomart image is: | ||
| + | +--[ RSA 1024]----+ | ||
| + | | . + | | ||
| + | | o + o | | ||
| + | | o * o | | ||
| + | | = X + | | ||
| + | | . E O | | ||
| + | | . = o | | ||
| + | | . o | | ||
| + | | o . | | ||
| + | | . | | ||
| + | +-----------------+ | ||
| + | </ | ||
| + | |||
| + | Habremos generado el siguiente archivo: | ||
| + | |||
| + | / | ||
| + | |||
| + | 2. (maquina1) Copiamos el archivo generado en el paso anterio a ' | ||
| + | |||
| + | ssh-copy-id usuario@maquina2 | ||
| + | |||
| + | ==== A mano ==== | ||
| 1. (maquina1) Creamos las claves para el usuario ' | 1. (maquina1) Creamos las claves para el usuario ' | ||
| - | ssh-keygen -t dsa | + | ssh-keygen -t rsa | 
| Pulsamos ' | Pulsamos ' | ||
| < | < | ||
| - | Generating public/ | + | Generating public/ | 
| - | Enter file in which to save the key (/ | + | Enter file in which to save the key (/ | 
| Enter passphrase (empty for no passphrase): | Enter passphrase (empty for no passphrase): | ||
| Enter same passphrase again: | Enter same passphrase again: | ||
| - | Your identification has been saved in / | + | Your identification has been saved in / | 
| - | Your public key has been saved in / | + | Your public key has been saved in / | 
| The key fingerprint is: | The key fingerprint is: | ||
| 3c: | 3c: | ||
| The key's randomart image is: | The key's randomart image is: | ||
| - | +--[ DSA 1024]----+ | + | +--[ RSA 1024]----+ | 
| | . + | | | . + | | ||
| | o + o | | | o + o | | ||
| Line 42: | Line 81: | ||
| Habremos generado el siguiente archivo: | Habremos generado el siguiente archivo: | ||
| - | / | + | / | 
| 2. (maquina1) Copiamos el archivo generado en el paso anterio a ' | 2. (maquina1) Copiamos el archivo generado en el paso anterio a ' | ||
| - | scp ~/.ssh/id_dsa.pub test-6.dev:/ | + | scp / | 
| 3. (maquina2) Creamos si no lo estan directorios y archivos necesarios. Finalmente incorporamos el archivo de claves a la lista de maquinas autorizadas: | 3. (maquina2) Creamos si no lo estan directorios y archivos necesarios. Finalmente incorporamos el archivo de claves a la lista de maquinas autorizadas: | ||
| < | < | ||
| - | cd | ||
| [[ ! .ssh ]]; mkdir .ssh | [[ ! .ssh ]]; mkdir .ssh | ||
| [[ ! .ssh/ | [[ ! .ssh/ | ||
| chmod 600 .ssh/ | chmod 600 .ssh/ | ||
| - | cat /tmp/id_dsa.pub >> / | + | cat /tmp/id_rsa.pub >> / | 
| </ | </ | ||
informatica/linux/ssh/login_intercambio_claves.1387786565.txt.gz · Last modified:  (external edit)
                
                