Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-13-2006, 08:19 AM   #1
LQ Newbie
Registered: Oct 2006
Distribution: FC 3 and 4
Posts: 24

Rep: Reputation: 15

I am working on the same type of set up. However I am using it for my Lan to copy a back up zip between servers. I for the most part get how the script works but not the .netrc. And since I am not worried about security can I put those values into the script itself and have one file that checks and logs in and sends the file.
Old 11-13-2006, 12:35 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
You could do that, but you SHOULD be worried about security. Ideally for
in-house stuff you should be using ssh (passwordless) connections as well,
maybe with a reduced compression level to speed things up and reduce CPU
usage as well.


P.S.: I've split out your post and my response because the original post and
your request aren't really that closely related.
Old 11-13-2006, 12:48 PM   #3
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Botched solution: run autoexpect, copy the file using FTP or similar interactive tool, save the expect script, run when necessary.
Proper colution: Configure ssh so you can log into one machine from the other without a password (public key authentication), use scp to do the copy.

The scp method is not only the more secure (by a long shot - no password in script file & data is encrypted across the network), but it's more reliable as well. expect scripts can fall foul of config changes like a change to the prompt on one system.


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
Copy file by script python ! BongHongXanh Programming 2 01-11-2006 09:26 PM
Shell script to copy file name with part of directory Transition Linux - General 5 01-18-2005 06:40 PM
shell script to copy lines from a file Warmduvet Programming 2 09-14-2004 10:25 PM
Run script during file copy or create in directory neranjana Linux - General 1 01-13-2004 07:57 AM
copy 1 file to multiple dir script carpman Linux - General 14 02-07-2002 10:29 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:40 AM.

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