Unix - Ftp and Sftp

Status
Not open for further replies.

ramprasad

In the zone
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

FooBar Guy
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.
 
Status
Not open for further replies.
Top Bottom