Welcome to the most active Linux Forum on the web.
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 04-07-2005, 04:11 AM   #1
LQ Newbie
Registered: Apr 2005
Distribution: Slackware
Posts: 8

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


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

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

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
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, 05:19 AM   #3
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,528

Rep: Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781
You can use ftp, but you must create a file in your home directory in box-A named .netrc. There you should write:
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, 05:59 AM   #4
LQ Newbie
Registered: Apr 2005
Distribution: Slackware
Posts: 8

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


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

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

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