AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
Expand all | Collapse all

unable to connect to oracle ora

  • 1.  unable to connect to oracle ora

    Posted Tue February 22, 2011 01:50 PM

    Originally posted by: SystemAdmin


    Hey Guys,

    ServerA - Nim server
    ServerB - database server running with SAP/Oracle

    my question is i want to connect to oraSID user(database server) from NIM server doing ssh in single command.

    serverA# ssh root@serverB ; su - ora<SID>

    executed the above command to connect to database server remotely from Nim server connected to serverB as root, but im unable to connect to ora user with the single command which i have executed

    guys any idea how to connect with single command, let me know please...

    FYI:
    ssh keys are shared to database server.

    Thanks in Advance
    Kiran.
    #AIX-Forum


  • 2.  Re: unable to connect to oracle ora

    Posted Tue February 22, 2011 07:30 PM

    Originally posted by: mmveiga


    Kiran,

    serverA# ssh ora<SID>@serverB

    The user ora<SID> from serverB needs root's SSH public key from serverA added to ~ora<SID>/.ssh/authorized_keys

    Marcelo
    #AIX-Forum


  • 3.  Re: unable to connect to oracle ora

    Posted Mon February 28, 2011 10:56 PM

    Originally posted by: Ashok_AIX_Admin


    Try expect

    copy this code in a shell script and execute.

    #!/usr/bin/expect -f
    spawn ssh root@server
    expect "password*"
    send -- "<root password>\r"
    expect "#*"
    send -- "sudo su - orasid\r"
    interact

    ==========================
    #AIX-Forum