ssh key exchange

SSH KEY_GEN
___

ocem@localmachine ~
$ ssh-keygen.exe -tdsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/ocem/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ocem/.ssh/id_dsa.
Your public key has been saved in /home/ocem/.ssh/id_dsa.pub.
The key fingerprint is:
00:FF:FF:a9:00:46:b1:e0:fa:d9:e5:00:60:00:28:c9 ocem@localmachine
The key's randomart image is:
+-[DSA 1024]+
| |
| |
| |
| . .. |
| .S…. |
| .=.. . |
| …+.o.+ |
| .o=.+.0=.. |
| .+.. .o..o|
+
---+

ocem@localmachine ~
$

ocem@localmachine ~
$ ssh-copy-id -i .ssh/id_dsa.pub remoteuser@remotehost
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed — if you are prompted now it is to install the new keys
remoteuser@remotehost's password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh 'remoteuser@remotehost'"
and check to make sure that only the key(s) you wanted were added.

ocem@localmachine ~
ocem@localmachine ~
$ ssh 'remoteuser@remotehost'
Last login: Wed Feb 25 13:11:18 2015 from localmachine.oepm.local
alias data="cd $AW/data"
[remoteuser@remotehost ~]$