2000-06-29-12:38:38 Didier Journois:
> Using openSSH I am unable to use it instead of rsh even when
> $RSYNC_PASSWORD is set or by reading the password in a file. I
> am prompted for entering it avoiding to use a non interactive
> transfer. Is there one other env variable I missed for ssh ?

If you want to use ssh non-interactively, don't try and do it with
stored passwords; instead, use keys. For most any ssh, I believe you
should be able to go something like this, where $dst is the
destination host you want to connect to. Run this as the originating
user on the originating host, and if the dst user is not the same as
the originating user, set dst to dstuser@dsthost.

        ssh-keygen
        # hit enter three times, to choose the default
        # target of ~/.ssh/identity for the key, and enter
        # an empty passphrase twice
        ssh $dst mkdir -p .ssh
        ssh $dst chmod 700 .ssh
        scp .ssh/identity.pub $dst:.ssh/authorized_keys
        ssh $dst chmod 600 .ssh/authorized_keys

At this point you should be able to ssh $dst with no password
requested.

If you're using the latest version of openssh, and you wish to avoid
violating RSA Data Security's patent on RSA public key encryption
(valid for another 3 months from today, to the day) then you can use

        ssh-keygen -d

to generate "id_dsa" and "id_dsa.pub" rather than "identity"; then
copy id_dsa.pub to $dst/.ssh/authorized_keys2.

-Bennett

PGP signature

Reply via email to