want to use SCP without password

Posted on 2011-10-10
Last Modified: 2012-05-12
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
Question by:nirvairghuman
    LVL 16

    Accepted Solution


    Author Comment

    I want to use SCP not FTP.
    LVL 23

    Assisted Solution

    see if the following link on How To scp, ssh and rsync without prompting for password helps:
    LVL 4

    Assisted Solution

    by:Christopher Raymond Mendoza

    Author Comment

    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.
    LVL 9

    Assisted Solution

    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 (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 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.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now