LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2005, 01:45 AM   #1
asschay
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Rep: Reputation: 0
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 192.168.0.1 | password

but that has no joy

any suggestions that can enlighten me?

Thank you so much

A.
 
Old 09-16-2005, 02:03 AM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
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.

Last edited by spooon; 09-16-2005 at 02:05 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check in a script whether the shell is login or non login? frankie_DJ Programming 7 10-21-2015 10:09 AM
A little login issue help nostracosa Linux - General 1 08-14-2005 02:02 PM
KDE 3.0 Login issue LevesqueOnline Linux - General 2 08-22-2004 09:42 PM
Script Issue gauge73 Linux - General 8 07-14-2003 08:50 AM
Login Issue dvong3 Solaris / OpenSolaris 1 06-25-2003 09:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration