Hi,
I would like auto logon to the Aruba Controller (3600 OS 6.4) via SSH and perform few commands. I have following two files:
autologon.bat
plink -v -ssh arubadmin@ip -pw password mycommands.txt
mycommands.txt
en
password-for-enable
local-userdb-guest add generate-username generate-password expiry duration 180
exit
exit
when I run the autologon.bat, following is what I get
Connecting to 10.x.x.x port 22
We claim version: SSH-2.0-PuTTY_Release_0.70
Server version: SSH-2.0-OpenSSH_5.8
We believe remote version has SSH-2 channel request bug
Using SSH protocol version 2
Using Diffie-Hellman with standard group "group14"
Doing Diffie-Hellman key exchange with hash SHA-1
Server also has ssh-dss host key, but we don't know it
Host key fingerprint is:
ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Initialised AES-256 CBC client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 CBC server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "arubadmin".
Attempting keyboard-interactive authentication
Server refused keyboard-interactive authentication
Sent password
Access granted
Opening session as main channel
Opened main channel
Started a shell/command
Server sent command exit status 1
Disconnected: All channels closed
If I just type following then I will be presented with the Controller prompt to type enable i.e. "(Controller-Name) >"
plink -v -ssh arubadmin@ip -pw password
Connecting to xxxxxxx port 22
We claim version: SSH-2.0-PuTTY_Release_0.70
Server version: SSH-2.0-OpenSSH_5.8
We believe remote version has SSH-2 channel request bug
Using SSH protocol version 2
Using Diffie-Hellman with standard group "group14"
Doing Diffie-Hellman key exchange with hash SHA-1
Server also has ssh-dss host key, but we don't know it
Host key fingerprint is:
ssh-rsa 2048 xxxxxxxxxxx
Initialised AES-256 CBC client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 CBC server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "arubaadmin".
Attempting keyboard-interactive authentication
Server refused keyboard-interactive authentication
Sent password
Access granted
Opening session as main channel
Opened main channel
Allocated pty (ospeed 38400bps, ispeed 38400bps)
Started a shell/command
Last login: Sun Feb 25 12:14:44 2018 from 10.1.32.6
All the above files and the plink.exe is on same folder. I have temporarily bypassed the enable, however it throws same error. It seems like it is not running the commands that are in the text file.
Has anyone successfully managed to do this ?
I have already gone through the following article:
https://community.arubanetworks.com/t5/Wireless-Access/Auto-Login-to-Aruba-using-plink/m-p/90220
https://community.arubanetworks.com/t5/Wireless-Access/Used-plink-to-send-command-aruba-320-series/m-p/295912
https://community.arubanetworks.com/t5/Wireless-Access/PLINK-SSH-Scripting-to-Mobility-Controller/m-p/110225
Any help would be much appreciated, thank you.