want to use SCP without password

Hi Guys,
I need to transfer some of the files from source to target host through SCP in a shell script, but how can I achieve this without asking password for oracle user
Who is Participating?
Swadhin RayConnect With a Mentor Senior Technical Engineer Commented:
nirvairghumanAuthor Commented:
I want to use SCP not FTP.
OP_ZaharinConnect With a Mentor Commented:
see if the following link on How To scp, ssh and rsync without prompting for password helps:
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Christopher Raymond MendozaConnect With a Mentor Commented:
nirvairghumanAuthor Commented:
the syntax to create the key pair is:

ssh-keygen -t rsa

Thanks a lot i went through the link and got helpful information. Can you please explain how to use above command.
parparovConnect With a Mentor Commented:
On the server from which scp will be run, as the user that will run the scp issue the command listed and hit enter to every question it asks.

You will get two files generated in the ~/.ssh/ directory - id_rsa (private key) and id_rsa.pub (public key)

On the server to which scp will connect as the user on that machine to which scp will connect, create directory ~/.ssh (if it does not exist already) and append (or create if does not exist0 the contents of id_rsa.pub to the file called authorized_keys .
Check that the permissions are user read/write/execute on ~/.ssh dir and user read/write on the authorized_keys file.
Then you will be able to ssh, scp and sftp without passwords.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.