On Tuesday 13 July 2004 21:29, Allen Umlas wrote:
> what options do i have to add so that i would not ask a password whenever i
> execute this command?
use ssh public key authentication. some of the following is not very precise,
there are howtos online if you need lots of precision. the below should work
if the username is the same on the client and server (obviously true from your
example command line).
1. on the client (the one that will ssh to the server),
ssh-keygen -t dsa
optionally, you can set other parameters (keylength, etc, i like dsa, but
you can use other keytypes).
2. copy the id_dsa.pub to the server, put it in your .ssh directory, fix the
permissions (.ssh should be -rwx------, although -rwxr-x--- is ok, i
think.
3. rename the id_dsa.pub on the server to, for authorized_keys (might be
a different filename, see your /etc/ssh/sshd_configfor the authorized
keys filename).
4. on the client, when you do the ssh, specify the id_dsa private key
on the command line, e.g.
ssh -i id_dsa <servername>
or, in your example,
rsync <rsync_options> -e "ssh -i id_dsa" <src> <dest>
if that works at the command line, then it'll work in your script too, just
add the -i id_dsa in there. i tend to prefer to use the ~/.ssh/config file to
specify which private key to use to auth to which server... but the command
line is easier to describe here.
note, you don't *have* to use the id_dsa name. that's just the default. you
can rename the public and private keys if you want.
good luck.
tiger
PS. OTTOMY (off the top of my head), may need some minor adjustment
or fixes.
--
Gerald Timothy Quimpo [EMAIL PROTECTED] [EMAIL PROTECTED]
http://bopolissimus.sni.ph
Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78"
A man's face is his autobiography. A woman's face is her work
of fiction.
Oscar Wilde
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie