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
nirvairghumanAsked:
Who is Participating?
 
Swadhin RayConnect With a Mentor Senior Technical Engineer Commented:
0
 
nirvairghumanAuthor Commented:
I want to use SCP not FTP.
0
 
OP_ZaharinConnect With a Mentor Commented:
see if the following link on How To scp, ssh and rsync without prompting for password helps:
http://blogs.oracle.com/jkini/entry/how_to_scp_scp_and
0
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:
0
 
nirvairghumanAuthor Commented:
the syntax to create the key pair is:


ssh-keygen -t rsa

Slobaray,
Thanks a lot i went through the link and got helpful information. Can you please explain how to use above command.
0
 
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.
0
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.