-   Linux - Newbie (
-   -   a login script issue (

asschay 09-16-2005 02:45 AM

a login script issue
Here again,

I want to make a script that grab a file from a box to another periodically.
Customers prefer writing the script on dos-shell, but that's not the problem.

I could fetch the file using scp2 from windows, the problem is I need to supply the password.
The file is not owned by superuser, so I don't need to login as a root.

Is there a way to give the password automatically or maybe create a passwordless user in linux?

I was reading some of threads on login script, and I stumbled upon using sudoers.
if I make a user JOE and add this line to sudoers

JOE ALL = NOPASSWD: /data.sql <- this is the file that i need to get

do you think I can execute a script to grab that file with no password?

i tried doing this

scp2 | password

but that has no joy

any suggestions that can enlighten me?

Thank you so much


spooon 09-16-2005 03:03 AM

You can login without a password by generating a public key on the client with the "ssh-keygen" command or equivalent (e.g. here's how to do it on Putty if you use Windows), and then adding the key into the ~/.ssh/authorized_keys2 file on the computer you're logging into.

All times are GMT -5. The time now is 01:56 PM.