DIGIT-ARC read-only archive · snapshot: July 23, 2026

Unix - Ftp and Sftp

2 posts · originally from https://geek.digit.in/community/threads/unix-ftp-and-sftp.20270/

ramprasad
ramprasad Original post #1
Dec 13, 2005 at 10:19 AM
Hi guyz,

I need a file to be transfered onto a server via SFTP.

Help me with the code.....

The code should be in shell script format so that it can be included in the cronjob which is a schedule of jobs run together.

Any help would be appreciated.....
GNUrag
GNUrag #2
Dec 13, 2005 at 9:33 PM
First generate an ssh keypair for your login.

$ ssh-keygen

When it asks for password, give a blank password.

Next transfer your public keys to the remote server

next:

$ sftp -r /home/anurag/uploads anurag@remote-server.org:/path/to/target/

Put this in crontab if you wish to do so.