SFTP and SCP help

Hi All,

I have to make an automated script that needs to do SFTP or SCP from my Unix server to another Unix server.

I have gone through search of this website for sftp and scp.
I really get confused when it talk about ssh key or rsh key and sftp -b thing

I would really appreciate if some one can explain step by step commands that needs to be executed from A to Z of this setup.
or point me to any easy to understand documentation please.

Earlier also i was required to make sftp script and gave up as i was not aware of unix.com at that time.

Hopefully this time with the help of Unix.com community i would completely understand the logic of SSH or RSH for SFTP and SCP.

NOTE: I know how to do FTP.

Appreciate your help.

if u r having problem with creating ssh connection you can go through this:
SSH login without password

Hope this help.

How can I automate an SFTP transfer between two servers?

Thanks rishav and vidyadhar85.

I now understand how to set public and private key.
Waiting for permissions to try that out.

Also i was told that the existing script that we have for ftp which asks for password will work fine if i just replace ftp with sftp.
Though we have to pass the password.

Is it true the existing ftp script will work with passing of password if i just replace word "ftp" with "sftp"?

Appreciate reply.

scp sftp, ssh, sudo, and su are all explicitly designed to prevent you from using stored plaintext passwords because stored plaintext passwords have always been a really, really, really bad idea from a security perspective.

Forget the password and use keys.