Wireless Access

last person joined: 20 hours ago 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

Auto Login to Aruba using plink

This thread has been viewed 7 times
  • 1.  Auto Login to Aruba using plink

    Posted Aug 05, 2013 05:04 AM

    Dear Support 

     

                               I am using the following command to do auto login to aruba controller and add users via a text file.

     

    plink.exe -v -ssh username@ControllerIP -pw password -m Commands.txt

     

    but i am geting the following error.

     

    Looking up host "158.144.76.132"
    Connecting to 158.144.76.132 port 22
    Server version: SSH-2.0-OpenSSH_4.6
    Using SSH protocol version 2
    We claim version: SSH-2.0-PuTTY_Release_0.62
    Doing Diffie-Hellman group exchange
    Doing Diffie-Hellman key exchange with hash SHA-256
    Host key fingerprint is:
    ssh-rsa 2048 07:50:d9:41:2b:2e:d7:26:5c:f8:96:f6:da:7c:75:6a
    Initialised AES-256 SDCTR client->server encryption
    Initialised HMAC-SHA1 client->server MAC algorithm
    Initialised AES-256 SDCTR server->client encryption
    Initialised HMAC-SHA1 server->client MAC algorithm
    Using username "admin".
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %% ((( W A R N I N G ))) %%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %% The access to this system is restricted.Authorised users are to perform %%
    %% appropriate system/administrative activities only.Misuse or Unauthorized %%
    %% access will be investigated and penalised as per applicable security %%
    %% policies. %%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Sent password
    Access granted
    Opened channel for session
    Started a shell/command
    Server sent command exit status 1
    Disconnected: All channels closed

     

    Could please guide us in this we are close to automate the process

     

     

     



  • 2.  RE: Auto Login to Aruba using plink

    Posted Aug 08, 2013 04:15 PM

    Never tried Plink to manage the controller. i hope the following script help you in the automation. 

     

    https://arubanetworkskb.secure.force.com/pkb/articles/HowTo/R-174



  • 3.  RE: Auto Login to Aruba using plink

    Posted Aug 09, 2013 07:01 AM

    Hey thanks for the reply.I will surely update you on the script status.Thank you very much. 



  • 4.  RE: Auto Login to Aruba using plink

    Posted Oct 03, 2013 09:06 AM

    I tried using plink to add users to the internalDB of the controler and i was succesful

     

    here is what i did 

     

    Copy the below commands on a notepad and save it as internaldb.bat

    @ECHO OFF
    C:\plink.exe <username>@<x.x.x.x> -pw <password> <com.txt
    exit



     In order to automatically run commands without interaction, the commands you want to run need to be inserted into a text file "com.txt"

    local-userdb add username <username1> password <password1>
    local-userdb add username 
    <username2> password <password2>
    .
    .
    local-userdb add username
    <username50> password <password50>


    Keep the internaldb.bat , com.txt and plink.exe on the same directory and execute the bat file

    open up a command prompt, black screen comes up. Drag and drop your .bat file onto the window. If that doesnt work use cd (change directory) to go to where the file is and then press enter.



    Sample :

    @ECHO OFF
    C:\plink.exe admin@10.30.156.14 -pw aruba123 <com.txt
    exit

    - Use ssh to connect
    - Connect with the username admin
    - The IP address of the device we are connecting is 10.30.156.14
    - use the password aruba123
    - run the commands contained in the file called com.txt that resides in the current directory.



    Contents of com.txt file :

    local-userdb add username testprog1 password testprog1
    local-userdb add username testprog2 password testprog2
    .
    .
    .
    local-userdb add username testprog50 password testprog50

     

    plink.PNG

     

     

    please try the above and If this doesn't works for you we need investigate further what's different on your case