Scheduling scp through crontab in Solaris

Hi All,
I am trying to schedule the scp command in crontab in solaris production environment. It asks me to type the password seperately. Is there a way to schedule the scp without any interrupts like providing passwords.
If there is any script can you kindly share it with me.
Can anyone kindly help me please.
Warm regards,
Dan

To configure SSH, complete the following:
D.1.2.1 Create SSH Directory, and Create SSH Keys On Each Node
Complete the following steps on each node:
Log in as the software owner (in this example, the grid user).
To ensure that you are logged in as grid, and to verify that the user ID matches the expected user ID you have assigned to the grid user, enter the commands id and id grid. Ensure that Oracle user group and user and the user terminal window process you are using have group and user IDs are identical. For example:
$ id
uid=502(grid) gid=501(oinstall) groups=501(oinstall),502(grid,asmadmin,asmdba)
$ id grid
uid=502(grid) gid=501(oinstall) groups=501(oinstall),502(grid,asmadmin,asmdba)
If necessary, create the .ssh directory in the grid user's home directory, and set permissions on it to ensure that only the oracle user has read and write permissions:
$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
Note:
SSH configuration will fail if the permissions are not set to 700.
Enter the following command:
$ /usr/bin/ssh-keygen -t dsa
At the prompts, accept the default location for the key file (press Enter).
Note:
SSH with passphrase is not supported for Oracle Clusterware 11g release 2 and later releases.
This command writes the DSA public key to the ~/.ssh/id_dsa.pub file and the private key to the ~/.ssh/id_dsa file.
Never distribute the private key to anyone not authorized to perform Oracle software installations.
Repeat steps 1 through 4 on each node that you intend to make a member of the cluster, using the DSA key.
D.1.2.2 Add All Keys to a Common authorized_keys File
Complete the following steps:
On the local node, change directories to the .ssh directory in the Oracle grid infrastructure owner's home directory (typically, either grid or oracle).
Then, add the DSA key to the authorized_keys file using the following commands:
$ cat id_dsa.pub >> authorized_keys
$ ls
In the .ssh directory, you should see the id_rsa.pub keys that you have created, and the file authorized_keys.
On the local node, use SCP (Secure Copy) or SFTP (Secure FTP) to copy the authorized_keys file to the oracle user .ssh directory on a remote node. The following example is with SCP, on a node called node2, with the Oracle grid infrastructure owner grid, where the grid user path is /home/grid:
[grid@node1 .ssh]$ scp authorized_keys node2:/home/grid/.ssh/
You are prompted to accept a DSA key. Enter Yes, and you see that the node you are copying to is added to the known_hosts file.
When prompted, provide the password for the grid user, which should be the same on all nodes in the cluster. The authorized_keys file is copied to the remote node.
Your output should be similar to the following, where xxx represents parts of a valid IP address:
[grid@node1 .ssh]$ scp authorized_keys node2:/home/grid/.ssh/
The authenticity of host 'node2 (xxx.xxx.173.152) can't be established.
DSA key fingerprint is 7e:60:60:ae:40:40:d1:a6:f7:4e:zz:me:a7:48:ae:f6:7e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1,xxx.xxx.173.152' (dsa) to the list
of known hosts
grid@node2's password:
authorized_keys 100% 828 7.5MB/s 00:00
Using SSH, log in to the node where you copied the authorized_keys file. Then change to the .ssh directory, and using the cat command, add the DSA keys for the second node to the authorized_keys file, clicking Enter when you are prompted for a password, so that passwordless SSH is set up:
[grid@node1 .ssh]$ ssh node2
[grid@node2 grid]$ cd .ssh
[grid@node2 ssh]$ cat id_dsa.pub >> authorized_keys
Repeat steps 2 and 3 from each node to each other member node in the cluster.
When you have added keys from each cluster node member to the authorized_keys file on the last node you want to have as a cluster node member, then use scp to copy the authorized_keys file with the keys from all nodes back to each cluster node member, overwriting the existing version on the other nodes.
To confirm that you have all nodes in the authorized_keys file, enter the command more authorized_keys, and determine if there is a DSA key for each member node. The file lists the type of key (ssh-dsa), followed by the key, and then followed by the user and server. For example:
ssh-dsa AAAABBBB . . . = grid@node1
Note:
The grid user's /.ssh/authorized_keys file on every node must contain the contents from all of the /.ssh/id_dsa.pub files that you generated on all cluster nodes.
D.1.3 Enabling SSH User Equivalency on Cluster Nodes
After you have copied the authorized_keys file that contains all keys to each node in the cluster, complete the following procedure, in the order listed. In this example, the Oracle grid infrastructure software owner is named grid:
On the system where you want to run OUI, log in as the grid user.
Use the following command syntax, where hostname1, hostname2, and so on, are the public hostnames (alias and fully qualified domain name) of nodes in the cluster to run SSH from the local node to each node, including from the local node to itself, and from each node to each other node:
[grid@nodename]$ ssh hostname1 date
[grid@nodename]$ ssh hostname2 date
For example:
[grid@node1 grid]$ ssh node1 date
The authenticity of host 'node1 (xxx.xxx.100.101)' can't be established.
DSA key fingerprint is 7z:60:60:zz:48:48:z1:a0:f7:4e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1,xxx.xxx.100.101' (DSA) to the list of
known hosts.
Mon Dec 4 11:08:13 PST 2006
[grid@node1 grid]$ ssh node1.example.com date
The authenticity of host 'node1.example.com (xxx.xxx.100.101)' can't be
established.
DSA key fingerprint is 7z:60:60:zz:48:48:z1:a0:f7:4e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1.example.com,xxx.xxx.100.101' (DSA) to the
list of known hosts.
Mon Dec 4 11:08:13 PST 2006
[grid@node1 grid]$ ssh node2 date
Mon Dec 4 11:08:35 PST 2006
At the end of this process, the public hostname for each member node should be registered in the known_hosts file for all other cluster nodes.
If you are using a remote client to connect to the local node, and you see a message similar to "Warning: No xauth data; using fake authentication data for X11 forwarding," then this means that your authorized keys file is configured correctly, but your SSH configuration has X11 forwarding enabled. To correct this issue, proceed to "Setting Display and X11 Forwarding Configuration".
Repeat step 2 on each cluster node member.

Similar Messages

  • Scheduling a backup by running a script through crontab

    hello
    i want to take a backup by rman everyday at a specified time..it's just that i want to create a script and schedule a backup through crontab, so how do i do that?
    thanks for the help in advance..

    838579 wrote:
    hello
    i want to take a backup by rman everyday at a specified time..it's just that i want to create a script and schedule a backup through crontab, so how do i do that?
    thanks for the help in advance..What do you man "how do I do that"? Do you not know how to write a shell script? Do you not know how to use cron? What, exactly, do you need help with?

  • Datapump backup when scheduled through crontab doesnt work!

    Hi Masters,
    I had a script for taking export backup. I modified to take datapump backup instead of the conventinal export. And since then the cron job has stopped running.
    The oriiginal script was:
    #!/bin/bash
    cd /opt/ora10gr2
    . .profile
    cd /backup/oracle10g/EBACKUP/scripts/daily_run/
    kdat=`date +%d`
    kmon=`date +%b`
    while read i
    do
    touch /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    echo 'start time ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    date >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    exp system/manager@$i file='/backup/oracle10g/EBACKUP/db/daily_backup/dumps/'$i\_$kdat\_$kmon'.dmp' log=/backup/oracle10g/EBACKUP/db/daily_backup/logs/$i\_$kdat\_$kmon'.log' direct=y owner=sysadm statistics=none
    echo 'backup successfully done for ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    echo 'end time ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    compress '/backup/oracle10g/EBACKUP/db/daily_backup/dumps/'$i\_$kdat\_$kmon'.dmp'
    date >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    done < /backup/oracle10g/EBACKUP/scripts/daily_run/list_DB
    The names of the databases were kept in a file list_DB.
    After modification, the script looked like:
    #!/bin/ksh
    cd /opt/ora10gr2
    . .profile
    cd /backup/oracle10g/EBACKUP/scripts/daily_run/
    kdat=`date +%d`
    kmon=`date +%b`
    while read i
    do
    touch /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    echo 'start time ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    date >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    expdp system/manager@$i DUMPFILE=$i\_$kdat\_$kmon'.dmp' LOGFILE=$i\_$kdat\_$kmon'.log' SCHEMAS=sysadm DIRECTORY=dumps JOB_NAME=daily_backup PARALLEL=4
    echo 'backup successfully done for ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    echo 'end time ' $i >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    gzip '/backup/oracle10g/EBACKUP/db/daily_backup/'$i\_$kdat\_$kmon'.dmp'
    date >> /backup/oracle10g/EBACKUP/db/daily_backup/logs/exp_log\_$kdat\_$kmon.log
    done < /backup/oracle10g/EBACKUP/scripts/daily_run/list_DB
    This modified scripts run when executed stand alone from command line. But doesnt run when executed through crontab.
    Any help will be highly appreciated.
    Thanks,
    Anoop

    Hi,
    Two things I want to tell U.
    1. Re-direct the CRON output to log file & check the logfile for ERRORS.
    example :-
    43 17 * * 1-4 /backup/oracle10g/EBACKUP/scripts/daily_run/exp_bkpdb_temp1.sh > /backup/oracle10g/EBACKUP/scripts/daily_run/cron_expdb.log
    2. In command-line U have all the necessary PATH's set, hence it got executed. But when u execute the same script through CRON u have to manually set the PATH's in ur script.
    Do the below in command line:-
    echo $PATH
    add the output of above command in ur script as below & try.
    #!/bin/ksh
    export PATH=<output here....>
    - Elango R

  • Schedule lines through MRP

    Hi Friends,
    I have a scenario where in After running MRP, new schedule lines are being generated for an ROH inspite of having sufficient stock(in unrestricted use) & also some open schedule lines to fulfill the requirements. Kindly suggest as to how can i control the generation of schedule lines through MRP.
    Regards,
    SK

    Hi Bala
    The MRP type maintained is PD.
    Rgds,
    SK

  • Crontab in solaris

    Hi;
    At linux
    I can edit crontab with command
    $crontab -e
    ButI don't know to edit crontab at Solaris, when i try to use upper command i cant edit nothing i just have "?"... I found some site but not helpful
    Anyone can say me how i can edit crontab in solaris?
    Thanks a lot
    Helios

    Hi
    I found solution:
    login system as root
    then: type bash
    bash# export EDITOR=vi
    bash# crontab -e
    Regards

  • Transferring APO scheduling agreeement through CIF

    When we transfer scheduling agreement through CIF to APO, they automatically get created as type "OLTP". APO however, does not recognize vendors if the scheduling agreement is not of the type "APO".
    We would appreciate it if anyone knows a setting in CIF which would create scheduling agreements of type "APO" in the APO system.
    Thanks.

    Hello,
    In R/3 side in sch. agrrement ( ME32) if you go to additional data , the field External planning controls whether it is OLTP or APO SA .
    If you select it 1 it will transfer as APO SA if it is blank and still you CIF the SA to APO it will view as OLTP SA in APO.
    Pl. let me know if you required further information.
    Regards,
    Rajiv

  • Possibility of deleting the scheduled jobs through reports

    hi friends
    is it possible to delete the schedule jobs through report making?
    i mean i have to enter a particular user name
    list of jobs scheduled by him has to be listed
    and selecting the unwanted job have to delete all the jobs
    Thanks and regards
    s.janagar

    Jangar,
    Yes. This can be done. Write a delete statement and use it on the table TBTCO.
    Note: Any other operations can be done on the tables TBTC*
    Thanks,
    Babu Kilari

  • GETWA_NOT_ASSIGNED error while scheduling job through F9

    Hi All,
    i am getting <b>GETWA_NOT_ASSIGNED</B> dump while scheduling a job through F9 and giving local printer as LP01.
    any pointers regarding this ?
    thanks
    kunal kishan

    Hi Ankesh,
    can you please elaborate on this.???
    Basiclly when i am trying to schedule a job by pressing F9 and setting it to immediate. when i chek in SM36, the job gets cancelled. The dump says "GETWA_NOT_ASSIGNED" error. The source code where the error is soming is a refresh statement.

  • Scheduling Report through InfoView - Destination Email

    My question pertains to InfoView in Crystal Report Server 2008.  I am trying to set up a scheduled report to run once, and be emailed as a pdf to my own email address.  I am using the administrator account and can successfully do this through the CMC, but when I try to schedule the report through InfoView, the destination always reverts back to the Inbox destination rather than the email destination.  The job has a successful status, but the destination is always the Inbox.
    I am fairly confident my job servers are set up with the proper SMTP information since I am successful when trying this through the CMC and I am setting everything the same through InfoView. 
    Any ideas?

    Hello,
    This is Crystal Report Server 2008 and I guess Business Objects Enterprise 3.0.  
    When scheduling a report through InfoView I do the following:
    Recurrence - Now
    Format - I choose PDF, although it doesn't really matter for the problem I am having.  
    Destination - I choose email from the dropdown, there is no checkbox to ignore the defaults.  I have to input my own information.  I populate the From, To, and Subject boxes.  I also choose to have an attachment sent.  
    I click the Schedule button and I am taken to the History window.  The job has a status of Running.  I choose refresh and the job completes with a status of Success.  However, when I click the status and the Instance Details are shown, the external destination line reads as Inbox and no email is delivered.  The report is delivered to the InfoView user's inbox, but not in an email as I selected.  
    This process works when performed through the CMC, but not through InfoView.
    Edited by: vtrujillo on Oct 8, 2009 5:13 PM

  • Plain Text Attachments are delivered as inline  through sendmail in Solaris

    We are trying to send a plain text attachment through sendmail, but it is delivered as a inline message with all the headers in the body of the mail.
    I am using the following format for the mail header
    dataFile << "\nContent-Type: MULTIPART/mixed; ";
    dataFile << "BOUNDARY=Shrewdness_of_Apes_263_000"<<endl;
    dataFile << "--Shrewdness_of_Apes_263_000"<<endl;
    dataFile << "Content-Type: TEXT/plain; charset=us-ascii"<<endl;
    dataFile << "Content-MD5: y0krffm1wXDXyHUnlA7/Ow=="<<endl;
    dataFile << "--Shrewdness_of_Apes_263_000"<<endl;
    dataFile << " Content-Type: TEXT/plain;";
    dataFile << " name=\"Report.txt\";charset = us-ascii" << endl;
    dataFile << " Content-Description:Report.txt"<<endl;
    dataFile << "Content-MD5: PzHeltJOzVrvtnvTQ9aofQ=="<<endl;
    dataFile << "\n--Shrewdness_of_Apes_263_000--"<<endl;
    Please tell whether the format is correct for Solaris 10.
    This is correctly working in Solaris 8.

    The information in your link is wrong.
    There are several options for doing what you want. The easiest, and best, option is to compress the attachments as zip files before attaching them. Then they'll always be displayed as file attachments. The recipient will have to unzip them, obviously. Some enterprise mail gateways may balk at zip attachments, because they're often used to distribute Windows malware.
    Another good option is to use a third-party mail client that better suits your needs, such as Thunderbird.
    You could try the third-party application called "Attachment Tamer," which purports to change the behavior of Mail. I have no experience with it.
    Finally, you can try the hack suggested in this thread:
    Problems with sending email attachments...: Apple Support Communities
    I have no idea whether it works and I don't recommend it.

  • Scheduling PI through Tivoli

    Hi All,
    I want to schedule my PI scenarios through Tivoli.
    Tivoli takes care of job scheduling and dependencies for SAP n NonSAP jobs.
    Is there any way to make PI scenarios dependent on Tivoli jobs?
    Thanks,
    Atul.

    Hi Nisar,
    Thanks for ur reply....
    I have multiple jobs running say Job1->Job2->Job3 in a sequence. Out of this Job1 and Job3 are NonSAP jobs and are scheduled in Tivoli. Where as Job2 is PI scenario which is File to file scenario.
    Now i want to trigger Job2 only when Job1 is completed. And i am not able to trigger this scenario.
    Is there any way in which we can trigger scenario through Command Line or something?
    Thanks,
    Atul

  • Scheduling Report  through  Command Line

    Post Author: gunjesh
    CA Forum: Administration
    Hi All,
              I would like to know how to schedule a  Webi (infoview) report of Bussiness Objects XI Release2    through Command line , Not through CMS.
    Command line options
    1. To schedule a report from CMS but using a command line. What all parameters are needed in order to do this ?
    2. To stop/reschedule a report being refreshed/running at this moment. What all parameters are needed in order to do this ?

    Post Author: sgolby
    CA Forum: Administration
    Did you have any luck finding out how to do this ?   We would like to trigger reports from the command line on demand. (or via an API is fine too)
    Thanks,
    Scott

  • Automation of scheduling agreement through EDI

    Hi,
    My Client want to update the scheduling agreement automatically through EDI, so wants need to be configured in SD point of view.
    looking for configuration details step by step
    thanks.

    hi all,
    any one can give idea or information about this.
    thanks.

  • Scheduling jobs through dbconsole

    Just trying to clear my concepts about automating jobs, my understanding is we can automate jobs through crontjobs (on unix) /taskscheduler (on windows)
    The other option is DBMS_SCHEDULER.
    any jobs like RMAN backups or sql scripts running should show up in below query(they are not running through Scheduled Tasks (its window box)
    but i see few jobs & RMAN backups running on one db but i can't see them in this query, what i am missing?
    SQL> SELECT owner, job_name, enabled FROM dba_scheduler_jobs;
    OWNER JOB_NAME ENABL
    SYS AUTO_SPACE_ADVISOR_JOB TRUE
    SYS GATHER_STATS_JOB FALSE
    SYS FGR$AUTOPURGE_JOB FALSE
    SYS PURGE_LOG TRUE
    ORACLE_OCM MGMT_STATS_CONFIG_JOB TRUE
    ORACLE_OCM MGMT_CONFIG_JOB TRUE
    6 rows selected.
    Edited by: DBA2011 on Jun 21, 2012 9:09 AM

    DBA2011 wrote:
    Just trying to clear my concepts about automating jobs, my understanding is we can automate jobs through crontjobs (on unix) /taskscheduler (on windows)
    The other option is DBMS_SCHEDULER.
    any jobs like RMAN backups or sql scripts running should show up in below query(they are not running through Scheduled Tasks (its window box)
    but i see few jobs & RMAN backups running on one db but i can't see them in this query, what i am missing?
    SQL> SELECT owner, job_name, enabled FROM dba_scheduler_jobs;
    OWNER JOB_NAME ENABL
    SYS AUTO_SPACE_ADVISOR_JOB TRUE
    SYS GATHER_STATS_JOB FALSE
    SYS FGR$AUTOPURGE_JOB FALSE
    SYS PURGE_LOG TRUE
    ORACLE_OCM MGMT_STATS_CONFIG_JOB TRUE
    ORACLE_OCM MGMT_CONFIG_JOB TRUE
    6 rows selected.
    Edited by: DBA2011 on Jun 21, 2012 9:09 AMdepends on how the job was scheduled. You should also check DBA_JOBS.
    And of course, there is no guarantee the job you expect to see actually exists in database B just becaue it existsin database A .....

  • How to disable scheduled task through database?

    I would like to know to disable scheduled task without OIM running, preferably through the database.
    OIM has out of the box schedule tasks that are set to run when OIM starts, and I would like to prevent that from happening.
    Is is possible to disable these tasks when OIM is not running?
    if possible I would like to know what I need to do, preferably through the database

    The QRTZ92_TRIGGERS table contains the trigger time of the schedule tasks. You can directly modify the START_TIME and the NEXT_FIRE_TIME columns to future dates in order to prevent the scheduled jobs from starting.
    You can also stop the Scheduler, which is responsible for kicking off the scheduled jobs.
    To manually stop the Scheduler go to http://OIM_HOST:OIM_PORT/SchedulerService-web/status
    You can configure the oim-config.xml so that the Scheduler is not started when OIM starts.
    Reference: Managing Scheduled Tasks
    To disable a schedule task, you have to have OIM running. You can use the APIs, modify the schedule tasks metadata (<taskStatus>false</taskStatus>), or use the UI to disable the schedule tasks.

Maybe you are looking for