LinuxQuestions.org
Review your favorite Linux distribution.
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 04-07-2005, 05:11 AM   #1
reeaver
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware
Posts: 8

Rep: Reputation: 0
How to send a file to other server?


Hi!

Is there any way to automatic send some files from one server to another using scp or ftp?
I know how to send file using that protocols, but I`d like to tell server A to send some files to server B about 3 o`clock PM every day.
I know that I have to use cron, but I have no idea what to do with passwords that server B will ask for.

Is there any scripts you can send me, or some way to solve this problem?

Oh, I forgot.. I have root account at server A, but I`m just a user at server B, so I can`t for example configure sshd with keys instead of passwords (that think might solve my problem).

And at server B there is proftpd+ssl installed. I don`t know is this information essential, but maybe it will be important.

Thanks for any tips

reeaver
 
Old 04-07-2005, 05:45 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
If you use entries in the authorized_keys file, then a password would not be requested. Otherwise I believe that you need to use the 'expect' program, if you can't alter the authorized_keys file of the remote host.
 
Old 04-07-2005, 06:19 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
You can use ftp, but you must create a file in your home directory in box-A named .netrc. There you should write:
Quote:
machine xx.xx.xx.xx
login your-username
password your-password
where xx.xx.xx.xx is the IP of server-B.
Thus when you ftp server-B it will not ask you for username/password
 
Old 04-07-2005, 06:59 AM   #4
reeaver
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: 0
Thank You very much!
It works!
 
  


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
I cannot send any file sanmartin Linux - Networking 1 01-31-2005 02:24 PM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 08:31 PM
I want to send a file every day sesnawi Linux - General 1 04-06-2004 10:12 AM
PHP: how to send a file? J_Szucs Programming 3 12-27-2003 11:04 PM
LICQ: send through server OR send directly mikeshn Linux - Software 0 06-09-2003 07:14 PM


All times are GMT -5. The time now is 12:15 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration