user3392291
user3392291

Reputation: 21

SFTP file from one remote server to other remote server using shell script without expect package

I'm trying to automate the transfer of files from one remote server to other remoter server using shell script. I cannot install expect package. Could anyone help me out in doing this?

Thanks.

Upvotes: 0

Views: 254

Answers (1)

Bhavesh
Bhavesh

Reputation: 919

Setup a password less login between remote server so it won't ask for password in shell script and it will avoid passing password in shell script for security reason

Please refer the below link to setup password less ssh

http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/

Then write a shell script to sftp the files

refer the SFTP command in the below link to do the needful

http://www.tecmint.com/sftp-command-examples/

Upvotes: 1

Related Questions