Passing SCP password in a script

Dear all,
I am passing a file from one server to another using scp. It asks for password to do with the command
scp -r /file_path/filename 10.10.80.80:/target_path, I want to schedule it in a script, how can I pass the password to scp in a script, or is there a way ro pass the password for as scp as argument in its command.
Regards,
Charan

For example: use curl to copy the file testme.txt from aaa.example.com to bbb.example.com, using account name oracle
Connect to host aaa:
$ ssh [email protected]
Create a known entry (fingerprint) for bbb.example.com in the ssh .known_hosts file:
$ ssh [email protected]
Are you sure you want to continue connecting (yes/no)? yes
(Warning: Permanently added 'bbb.example.com' (RSA) to the list of known hosts.
Create a test file and copy it to bbb.example.com using curl
$ echo "must not be empty" > testme.txt
$ curl -T testme.txt -u oracle:your_password scp://bbb.example.com/u02/backup
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     7      0     29 --:--:-- --:--:-- --:--:--    29Note: you will need a recent version of curl to support scp.

Similar Messages

  • DOES ANYONE KNOW HOW TO GET PASSED MY PASSWORD LOGIN on a mac pro? I FORGOT IT. (yosemite 10.10.1)

    DOES ANYONE KNOW HOW TO GET PASSED MY PASSWORD LOGIN on a mac pro? I FORGOT IT. (yosemite 10.10.1)

    User Tip:  Reset the user password in OS X Lion, Mountain Lion, Mavericks and Yosemite
    Posting in CAPS LOCK Is often seen as screaming and is not appreciated.  It's also very hard to read.

  • Just made the pc to Mac jump. Can I connect my iPad to my Mac Mini via Bluetooth ...my current keyboard isn't connecting so I can't even get passed the password screen.

    Someone please help me connect my two devices together so that I don't have to purchase yet another item. Is there an app or something that would allow me to connect my Mac Mini to my iPad 2 wirelessly. I can't get passed the password screen because the wireless Keyboard will no longer connect to my Mac ...helllllppp .... I use it for both my iPad and my Mac mini....does that matter?

    If your iPad is close enough to your keyboard and Mini
    and if the iPad is merely in standby and not off, the
    connection to the iPad is still active.  Therefore, the
    keyboard will not connect to the Mini.
    If the iPad is far enough away to break the Bluetooth
    connection or you unpair from the iPad or you turn the
    iPad off, then the keyboard should connect just fine with the Mini.
    Most Bluetooth HID's (Human Interface Device) can only service
    one host at a time.  This is by design. 

  • Can we pass paramters in the partition script

    Can we pass parameters in the partition script in Essbase. Where the parameters are read by a windows batch file which is executed in windows environment.
    Our Business requirement, the business will key in the parameters ie(Month and Year) in a partition script dynamically.
    We are scheduling the partition script through Windows Batch file.
    So is it possible to create a parameter file in windows and pass these parameters to windows batch file.It should be dynamically mapped with partition Script.If possible,can anyone provide sample script to show how it works.

    Thank You Wills. The requirement is the users want to change the mappings in the partition script, but users are not having any access to the EAS. They want the mappings to be dynamically changed in the partition script on adhoc basis.
    Admin can change the values to the substituion variables, but the requirement is users wants to change the mappings.
    So they asked for the parameter file.

  • How to pass a parameter into RMAN script

    Hello,
    I have the following rman script :
    run {
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    CONFIGURE CONTROLFILE AUTOBACKUP OFF;
    CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\ora_df%t_s%s_s%p';
    This script called configure.rman is launch by a .bat script with the following command:
    rman target 'sys/sys12@ORCL102 as sysdba' @c:\oracle\RmanORCL102\configure.rman
    How can I pass a parameter into rman script, I want to pass an additional directory like this:
    rman target 'sys/sys12@ORCL102 as sysdba' @c:\oracle\RmanORCL102\configure.rman v_dir_name
    And use it in rman script:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\$v_dir_name\ora_df%t_s%s_s%p';
    Is it a way to do this?
    Regards,
    Elodie

    One option would be to create a file called backup.bat with the following:
    echo run {
    echo CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    echo CONFIGURE CONTROLFILE AUTOBACKUP OFF;
    echo CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
    echo CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\%1\ora_df%t_s%s_s%p';
    echo } ) | rman target sys/sys12@orcl102and then call the script as:
    c:\> backup.bat backup_directory_name

  • Encrypting password in shell script on Solaris 10.

    Hi,
    I have a shell script & in that the username & password is specified. I can see the password. Is there any way to encrpyt password in Unix scripts on solaris 10 box.
    Please suggest.
    Thanks & Regards,
    Tejas

    Here are some examples of avoiding passwords in scripts.
    First, if it's a script that needs to use remote login, you could set up ssh keys in the authorized_keys file of the remote system to allow auto-authentication.
    As a more general example, you could create a shell function that prompts for the password and stores it in an environment variable to be used by the script or utility that you want to use. Here is an example that we use in our Red Hat systems to allow yum to tunnel through our http proxy:
    function yumproxy(){
        echo -n "Enter Proxy Username: "
        read -e username
        echo -n "Enter Proxy Password: "
        read -es password
        echo
        export http_proxy="http://$username:$password@ourproxyserver:8080/"
    }This is in .bashrc so that we can run it once just before running any yum commands (not that this means anything in a Solaris forum!)

  • Passing Username/Password from .xsql to Oracle

    Is there any other way to connect to the Oracle than hardcoding username, password, dburl and driver in the XSQLConfig.xml file?
    Can I use parameters in .xsql files?
    The idea is that every web user connects to DB like himself, so I am looking for a way to pass Username/Password from web application to the Oracle using xsql files on every connection.
    Thanks in advance.
    Oleg.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Most web applications connect as a single backend database user to maximize the benefit of connection pooling.<HR></BLOCKQUOTE>
    While that may be true for publically accessible sites, I've found many, many internal web-apps need user authentication (login, whatever). In fact, the inability to do this easily has tipped some of our projects away from web-apps.
    null

  • How to hide user id and password in batch scripts

    Hi,
    Can some one help me to hide the user id and password in batch scripts that used to automate Export and Action script execution process.
    Context : In my project client doesn't want display user id and password hence they are looking for secured way to hide them.
    Thanks for your answer in advance.
    Regards,
    Sainath.

    Sainath,
    Referring admin guide as mentioned by Craig is good option.
    Let me give you few steps that I did in one of my projects.
    Open command prompt and navigate to the path "C:\Oracle\Middleware\EPMSystem11R1\products\DataRelationshipManagement\client\batch-client".. here you can see many see other utilities as well.
    drm-batch-client-credentials.exe is the one used to encrypt the userid and password.
    open this in command prompt and then choose the application to which you want to encrypt the password.
    then remove userid and password from batch script then run it... it does what you want

  • How to avoid exposing oracle login password in a script?

    Hello,
    How do I avoid exposing the oracle login password in a script?
    Thank you.

    Script is run from another server. I was looking into OPS$ but if I ran the script from a remote server I would have to set the remote_os_authent to TRUE. But that might cause some security issue. Is there a feature in the listener I can set so that if I set the remote_os_authent to TRUE, the listener will only let those remote servers I pre-specify? Thanks.

  • Passing concurrent parameter to OS script

    I have a printer driver that calls an OS script and I want to pass a parameter value to that script from a concurrent program that uses that driver via a specific style.
    Is there anyway to reference the concurrent parameter? I'm already passing the filename to the script via $PROFILES$.FILENAME. Is there a similar reference to a parameter value that I could use?
    Any help would be much appreciated.
    Thanks,
    Todd

    Hi Todd
    I thinh this will only get the concurrent request id what he wants is to send the send the parameter to it.. Will it work.. I am not sure.. Just put my views thats all..
    Sunil

  • Pass credentials to cmd in script block

    Hi all so I'm invoking .cmd files to install software with cmd on remote machines using the invoke command in Powershell. It works fine for must software however when I try to install powershell on a remote machine it throws an exit code 5. I looked this
    up and it is a credential error. Is there anyway for me to pass my credential in the script block but also to cmd?
    Here is what I have now:
    Invoke-Command -ComputerName $item -Credential $cred -ScriptBlock {cmd /c "C:\Package\install.cmd"} -AsJob
    Thanks!

    What does your install.cmd actually do? Does it pull from another server or do anything related to a different remote system? If so, that will be denied by design as it is a 'double hop'. You would either need to enable CredSSP on that server or setup a
    RunAsAccount on the remote endpoint to allow access to another remote system from your current system that has the endpoint.
    cmd doesn't take credential objects and this shouldn't be an issue as you are passing your credentials to the scriptblock by default with the remote endpoint via the -Credential parameter. If you wanted to run cmd from another process under your provided
    credentials, you would need to use Start-Process with the -Credential parameter, but again, this is only going to be useful if you wanted to supply alternate credentials beyond what you are providing with Invoke-Command.
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • What is the Parameter values for passing a password to open a pdf

    I need help in finding the Parameter values for passing a password to open a pdf(s)? The software is written in Delphi.

    The Copy Protection only protects our Disk from being duplicated and also protects our Software from being copied and used locally.
    As far as the password encryption, that is why I created the Post. I was hoping that the password can be coded in our Software to open the password protect PDF that we create. This option would of gave us the security for when the customer copies the pdf to there local drive they would be required to input the password which they would not have access to.

  • Scripting - Passing and Enterprise variable from script to script

    Hello all,
    We are using UCCX 7.0_SR5
    I am looking to be able to pass a captured variable from one script to another.
    We use a message in queue where a caller waiting in queue can choose to leave a message and then that message is queued back into the sytem for the next available agent. When that agent recieves the message in queue they basically call back out to the customer leaving the message.
    We capture a variable in the first script when they decide to leave a message. The variable holds the call back number that they enter into the system. There is a second script that presents these message in queue calls to the agents. We would like to pass that variable that holds the number enterend by the customer to the second script so that that number appears on CAD in the enterprise data fields. The reason behind this is so the agent has a number to call back in the event they don't reach anyone when the system calls back out and the message left by the customer does not contain a call back number.
    How can I pass that variable from one script to another so it can be presented in CAD for the agents?
    Thanks for any help and let me know if you need any further information.

    You would use a "Get Call Contact Info" step to set your callerID variable, where the "Calling Number" attribute is set to your callerID variable.

  • Passing user parameters to groovy script

    From OIM 11gr2 ,I need to create users into LDAP through OID connector OID-11.1.1.6.0.
    After creation , i need to pass user id and other parameters to groovy script to run a command on target system.
    How do i pass these parameters to groovy script. Please assist

    Hi,
    I am calling the shell script from concurrent program and below is the log file of the concurrent program.
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    KORONT_041_SH module: KORONT - Daily Item Master Update
    +---------------------------------------------------------------------------+
    Current system time is 29-JUN-2011 10:09:35
    +---------------------------------------------------------------------------+
    REQUEST_ID: 68510795
    USER_ID: 4219
    PDC:    85
    Item Number:
    KORDC:    124
    PDCSET:   1100000003
    last_updated_in_hours: 24
    EMAIL_ID: [email protected],[email protected]
    SQLPATH: /e381/oracle/asodev01appl/custom/motont/1.0.0/sql/
    RPTDIR:  /e381/oracle/asodev01comn/admin/out/ASODEV01_asoprdb2
    RPTFILE: o68510795.out
    Table truncated.
    *Enter value for 6: User requested Interrupt or EOF detected.*
    Table truncated.
    old  15:       AND ic.organization_id   = &&4
    new  15:       AND ic.organization_id   = 1100000003
    0 rows created.
    Input truncated to 9 characters
    old   8:                AND organization_id   = &&4
    new   8:                AND organization_id   = 1100000003
    0 rows created.
    End of SQL
    No record.
    +---------------------------------------------------------------------------+
    Executing request completion options...
    +------------- 1) PRINT   -------------+
    Printing output file.
                   Request ID : 68510795      
             Number of copies : 0      
                      Printer : noprint
    +--------------------------------------+
    Finished executing request completion options.
    +---------------------------------------------------------------------------+
    Concurrent request completed successfully
    Current system time is 29-JUN-2011 10:09:38
    +---------------------------------------------------------------------------+Regards,
    Sreekanth

  • How to hide passwords in sql scripts?

    Hi!
    I have got a few sql scripts for some actions. In the scripts the connection information is plain text - even the SYS password in one script.
    Are there ways to solve this behaviour? Perhaps encrypt it or... What does the practice say - how do you solve this???
    Thanks
    Markus

    Depending on your environment and if these are administrative (DBA) scritps or production batch then here are some ideas:
    For DBA
    Run the scripts via cron in a DBA privileged account
    sqlplus /nolog <<EOF
    connect / as sysdba
    start script
    exit
    EOF
    The above requires no password,
    For production batch assuming that all production runs under one OS ID that access to is restricted then potentially you can use OS authentication so the Oracle username has no password: create user bob identified externally.
    sqlplus / @script
    will then do the job
    HTH -- Mark D Powell --

Maybe you are looking for

  • How do I use a music track as a ringtone on my C3

    I have music stored on my playlist that I want to use as a ringtone.  How do I this? Solved! Go to Solution.

  • No sound in imovie events but there is in projects

    I recently imported a lot of video to an external hard drive.  When I try and play the video in events, there is no sound.  When I drag it up to a project, there is sound.  What's up with that?!

  • Installing Gateway service on the BO Server

    Hi, We have an existing setup of BO XI 3.1 with the Integration Kit. Now, we are moving the production content to a new server. For the integration kit to communicate with the SAP system, I need to install the SAP Gateway service on the BO server. Ca

  • Custom Functions Test

    Hi All, I'm trying to run the test custom function, the "CapitalizeFunction". apart from placing the lib folder, example.jar and extension.xml in the 'Extensions" folder - is there anything I require to do? My rule is {code} the test is complete if -

  • Ios 6.0.1 Phone not recognized by any pc

    Just updated to Ios 6.0.1 about 30 minutes ago.  Was ready for bed so i plugged my phone in to charge and nothing!  So i stole my wifes phone cord and tried, and nothing again! I then plugged it in to my Macbook pro, and it was not detected, so i tri