Login con ssh client Keys

#ssh-keygen -t rsa

Roa$ ssh-keygen -t rsa

Generating public/private rsa key pair.

#Donde guardaremos las llaves

Enter file in which to save the key (/Users/Roa/.ssh/id_rsa):

#Si tendra contraseña nuestra llave

Enter passphrase (empty for no passphrase):

#llaves publica y privada creada

Your identification has been saved in /Users/Roa/.ssh/id_rsa.

Your public key has been saved in /Users/Roa/.ssh/id_rsa.pub.

The key fingerprint is:

28:1d:58:a8:89:70:70:ab:da:35:4a:eb:66:06:49:ba [email protected]

Ahora que ya tenemos nuestra llave

La copiaremos a las maquinas a donde nos conectamos en este caso si administramos servidores o simple maquinas locales.

scp .ssh/id_rsa.pub [email protected]:.ssh/authorized_keys2

scp .ssh/id_rsa.pub [email protected]:.ssh/authorized_keys2

[email protected]’s password:

id_rsa.pub 100% 401 0.4KB/s 00:00

Macintosh:~ Roa$ ssh [email protected]

Linux RoaVaio 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686

The programs included with the Ubuntu system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by

applicable law.

Last login: Tue Dec 11 23:26:58 2007 from macintosh.local

[email protected]:~$

Y listo es todo

Podremos usar alias

Macintosh:~ Roa$ alias vaio=’ssh [email protected]

Macintosh:~ Roa$ vaio

Linux RoaVaio 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686

The programs included with the Ubuntu system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by

applicable law.

Last login: Mon Jan 7 22:25:08 2008 from macintosh.local

[email protected]:~$

##

vaio “df;uptime”

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/sda3 37483592 7471700 28107788 22% /

varrun 513020 104 512916 1% /var/run

varlock 513020 0 513020 0% /var/lock

udev 513020 88 512932 1% /dev

devshm 513020 0 513020 0% /dev/shm

lrm 513020 34696 478324 7% /lib/modules/2.6.22-14-generic/volatile

/dev/sda1 6387708 5454604 933104 86% /media/sda1

22:31:54 up 1:00, 2 users, load average: 0.00, 0.00, 0.00

Macintosh:~ Roa$

Dudas,Comentarios?

[email protected]

[email protected]

Bibliografia

Administration Using ssh

Ussing ssh-Agent Effectively Linux Server Hacks O’rreily Rob Flickenger

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.