hi moshe,

> Can any one please explane how does the key exchange work under ssh ?

the sshd man page describes this process.

> i mean, how do i set a key pair that i can use to do scp from one server
> to the other and copy files without the need to supply a password (non
> interactive login)

create a key with no passphrase on host a, use a null string
as the passphrase i.e. as if you were generating a host key.
e.g. ssh-keygen -N ''

then put the pub key into the $HOME/.ssh/authorized_keys file of the 
destination user on host b. you may want to restrict this key to
a particular command & connecting host by prefixing the authorized_keys
entry for this key like so:
from="192.168.1.1",command="/opt/local/bin/sdistd" 1024 37 8172016....

see the docs for more details.

hope this helps,
pauline

Reply via email to