Skip to main content
S

Wed, Jan 20, 2021 7:06 PM

how to ssh from powershell to ruckus wireless AP (standalone)

I can start an SSH session to an R300 using these commandlets:

PS C:\WINDOWS\system32> $ruckussession = New-SSHSession -ComputerName 192.168.5.2 -Credential $cred
PS C:\WINDOWS\system32> Invoke-SSHCommand -Index $ruckussession.SessionId -Command $commands

But whatever the $commands, this gives output:

Host       : 192.168.5.2
Output     : {, Please login: }
ExitStatus : 1

This seems to be the same thing as when logging on via putty: One has to login al thougt credentials are sent with starting the SSH session. How can I overcome this?

Responses

Official Rep

 • 

801 Messages

 • 

12.1K Points

a month ago

Hi Stephen,

This is expected, because Ruckus AP CLI prompts below information when you try to SSH.

Login as

Please login

password

In "Login as" prompt, you can feed any dummy data, but actual login username is required on "Please login" prompt.

Refer the below login output from putty.

login as: admin

Please login: admin
password :
Copyright(C) 2018 Ruckus Wireless, Inc. All Rights Reserved.

** Ruckus T750 Multimedia Hotzone Wireless AP: xxxxxxxxxxx

rkscli:

Modify your login commands and add the context for "Login as", and it should work.

Regards,

Syamantak Omer

3 Messages

 • 

90 Points

@syamantak_omer thanks for your reply. 

I know how to log on interactively, e.g. via PuTTy. But via powershell SSH session, I cannot get it working. What do you mean exactly with: Modify your login commands and add the context for "Login as"?  How can I do this in the powershell script?

Regards,

Stephan van der Plas

3 Messages

 • 

90 Points

This works:

#$cred = Get-Credential
$ruckussession = New-SSHSession -ComputerName 192.168.5.2 -Credential $cred
$sshshellstream = New-SSHShellStream -Index $ruckussession.SessionId
$sshshellstream.WriteLine('super')

$sshshellstream.WriteLine('password')

sleep 2

$sshshellstream.WriteLine('get station wlan10 list')
sleep 2

$sshshellstream.Read()

Thanks for your help. Now I can use this in my Domoticz system for presence detection.

Regards,

Stephan van der Plas

(edited)

Official Rep

 • 

801 Messages

 • 

12.1K Points

Glad to know that you were able to fix it!

Regards,

Syamantak Omer