[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 335
  • Last Modified:

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
0
nirvairghuman
Asked:
nirvairghuman
4 Solutions
 
Swadhin RaySenior Technical Engineer Commented:
0
 
nirvairghumanAuthor Commented:
I want to use SCP not FTP.
0
 
OP_ZaharinCommented:
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
Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

 
Christopher Raymond MendozaCommented:
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
 
parparovCommented:
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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now