Wireless Access

Reply
Occasional Contributor II

Auto Login to Aruba using plink

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

 

 

 

Aruba Employee

Re: Auto Login to Aruba using plink

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

Vinod Kumaar AVM ACMX, ACDX
Principal Network Engineer
Customer Advocacy | Aruba Networks Inc.

Did something you read in the Community solve a problem for you? If so, click "Accept as Solution" in the bottom right hand corner of the post.
Occasional Contributor II

Re: Auto Login to Aruba using plink

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

Aruba Employee

Re: Auto Login to Aruba using plink

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 

****************************************************************************
----------------This post uses only 100% recycled electrons------------------
************** Don't Forget to Kudos + me,If i helped you ***************
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: