sábado, 18 de mayo de 2013

Pass on Passwords with scp

Spanish Keywords: Transferir contraseñas cuándo se utiliza SCP

 

[root@mail ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/identity
/root/.ssh/identity already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/identity.
Your public key has been saved in /root/.ssh/identity.pub.
The key fingerprint is:
c0:0e:87:e7:eb:ef:e4:ab:ce:3a:56:7a:29:ae:58:6d root@mail.dominio.com
[root@mail ~]# ssh root@192.168.11.4 "cat >> .ssh/authorized_keys" root@192.168.11.4's password:
[root@mail ~]# scp -i /root/.ssh/identity -r -p -v root@192.168.11.4:/var/tmp /var/tmp
Executing: program /usr/bin/ssh host 192.168.11.4, user root, command scp -v -r -p -f /var/tmp
debug1: Next authentication method: publickey
debug1: Offering public key: /root/.ssh/identity
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = es_ES.UTF-8
debug1: Sending command: scp -v -r -p -f /var/tmp
Sink: T1327697048 0 1335283684 0
Entering directory: D0777 0 tmp
Sink: D0777 0 tmp
Sink: T1325863698 0 1335283726 0
Sending file modes: C0444 62059831 VMwareTools-8.6.0-425873.tar.gz
Sink: C0444 62059831 VMwareTools-8.6.0-425873.tar.gz
VMwareTools-8.6.0-425873.tar.gz               100%   59MB  29.6MB/s   00:02
Sink: E
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 2.4 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0


No hay comentarios:

Publicar un comentario