LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to send a file to other server? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-send-a-file-to-other-server-310647/)

reeaver 04-07-2005 04:11 AM

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

jschiwal 04-07-2005 04:45 AM

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.

bathory 04-07-2005 05:19 AM

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

reeaver 04-07-2005 05:59 AM

Thank You very much!
It works!


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