HP OO SSH ,unable to excute commands

Unable to login to vplex and excute vplexxli commands through SSH
I am trying to achive the below mentiond sequence of steps through HP OO SSH
1.Login to vplex server through Putty ( Host IP & User name & Password)
2.It will prompt service@AUHTIFM1SV11VPX01:~>
3.Type cmd vplexcli and press enter
4.It will prompt "End User Name:"
5. Type  user name as service and press enter
6. It will prompt for "Password:"
7. enter password as "root123#" press enter
8. Now it will prompt with VPlexcli:/>
7. type ls -l press enter
Note: The credentials used in step1 and Step 4 & 5 are vary

I am using HP OO 10.2x
Base CP of 1.10.0
The Operation using is: /Base/Operations/Remote Command Execution/SSH/v2.0/SSH Shell
I have passed below parametrs for this step
User Name: service
password:*****
knownHostsPolicy:allow
command:send vplexcli \r\nexpectEndsWith ":" \r\nsend ${user} \r\nsendChar 13 \r\nexpectEndsWith ":" \r\nsend ${password} \r\nsendChar 13 \r\nexpectLastLine "VPlexcli:/> " \r\nsend ls -l
characterSet:UTF-8
newlineCharacters:\r\n

I am getting below mentioned output:

{returnResult=vplexcli \r\nexpectEndsWith ":" \r\nsend ${user} \r\nsendChar 13 \r\nexpectEndsWith ":" \r\nsend Mi@Dim7T \r\nsendChar 13 \r\nexpectLastLine "VPlexcli:/> " \r\nsend ls -l

service@AUHITFM1SV01VPX01:~> vplexcli \r\nexpectEndsWith ":" \r\nsend ${user} \r
\nsendChar 13 \r\nexpectEndsWith ":" \r\nsend Mi@Dim7T \r\nsendChar 13 \r\nexpec
tLastLine "VPlexcli:/> " \r\nsend ls -l
Trying ::1...

Connected to localhost.

Escape character is '^]'.


Enter User Name:                                                               ;Result=;}

After Enter User Name: it is not proocessing further. Need your help in resolving this

Regards,

Hussain

 

Tags:

  • Hi All,

    I have done few chnages in the command passing to SSH Shell , now it is taking me to till password prompt , from there it is not processing further,Need your help here

    Command:

    send vplexcli \r\n
    Wait 250 send ${vplexuid}\r\n
    Wait 350 send ${vplexpwd}\r\n
    Wait 250 send send ls\r\n

    OutPut:

    {SESSION_ON=true;returnCode=0;visualized=<Frames>
    <Frame index="1">vplexcli \r\n

    service@AUHITFM1SV01VPX01:~&gt; vplexcli \r\n
    Trying ::1...
    Connected to localhost.
    Escape character is '^]'.

    Enter User Name:                                                               s
    ervice\r\n

    Password:</Frame>
    </Frames>;returnResult=vplexcli \r\n

    service@AUHITFM1SV01VPX01:~> vplexcli \r\n
    Trying ::1...

    Connected to localhost.

    Escape character is '^]'.


    Enter User Name:                                                               service\r\n

    Password:                                                                      
    ;TimedOut=false;STDOUT=vplexcli \r\n

    service@AUHITFM1SV01VPX01:~> vplexcli \r\n
    Trying ::1...

    Connected to localhost.

    Escape character is '^]'.


    Enter User Name:                                                               service\r\n

    Password:                                                                      
    ;Result=vplexcli \r\n

    service@AUHITFM1SV01VPX01:~> vplexcli \r\n
    Trying ::1...

    Connected to localhost.

    Escape character is '^]'.


    Enter User Name:                                                               service\r\n

    Password:                                                                      
    ;}

     

  • Have you tried
    expectEndsWith >
    send vplexcli \r\n
    expectEndsWith : 
    send ${vplexuid}\r\n
    expectEndsWith : 
    send ${vplexpwd}\r\n
    expectEndsWith > (i dont know what your vplecli prompt value is $ > / - whatever prompt ends with put that in place of >)
    send ls\r\n

  • Dear JarodMB,

    Yes, I have tried these commands ,but didnt worked for me.

    Manual Process of Login to vplex and executing commands
    1. Login to vplex server 10.10.32.32
     Ouputput:
        service@AUIHFTM1SV01VPX01:~>
    2.Type vplexcli
    Output:
    Trying ::1...
    Connected to localhost.
    Escape character is '^]'.
    Enter User Name:

    3. Enter user name ad :'service' and Press enter button
    Output:
        Password:
    4.enter password as:Mi@Dim7T press enter
    Output:
        creating logfile:/var/log/VPlex/cli/session.log_service_localhost_T25080_20180410051355
        VPlexcli:/>
    5.type ls and press enter
    Output:
    cluster-witness  clusters         data-migrations  distributed-storage  engines  management-server  monitoring  notifications  recoverpoint
    security         system-defaults
    VPlexcli:/>

    Reagrds,

    Hussain