Zyxel XS1930-12HP SSH command over libssh (C++)
I am trying to run the SSH command "show pwr" in my program (C++) via SSH connection. I use the libssh for this. I can see in the system log of the switch that the connection works:
"IN authentication: SSH user admin login [IP address = 192.168.0.172]".
When I send the command "show pwr" I receive the "unknown error" (-1). In system log unfortunately nothing is shown here.
If I use a different product instead of Zyxel, everything works fine.
Does anyone have an idea what the problem could be?
May I know you got the error message when you run your program? Or have you try to SSH to XS1930-12HP and enter the command and get same error message?
Based on your test result, using PuTTY is working fine. And we also tried Tera term and local SSH via Windows command line, they all work well with ZYXEL switch.
Not sure what Libssh did to cause the difference. Since the error is returned by Libssh, maybe they could explain why it happens.
Zyxel_Melen,The libssh I use runs fine. Several projects run without problems. The problem must be something else. I suspect that the switch only supports "interactive" ssh sessions. If I enter the following command in git-bash:ssh [email protected] show pwr
orssh [email protected]68.0.10 "show pwr"
I get the following message from the switch:
"Received disconnect from 192.168.0.10 port 22:2: invalid command pwr."To me it looks like the switch does not support the direct commands.0
- 8.4K All Categories
- 1.6K Nebula
- 70 Nebula Ideas
- 57 Nebula Status and Incidents
- 4.5K Security
- 226 Security Ideas
- 980 Switch
- 46 Switch Ideas
- 870 WirelessLAN
- 22 WLAN Ideas
- 5.1K Consumer Product
- 156 Service & License
- 280 News and Release
- 97 Success Stories
- 58 Security Advisories
- 13 Education Center
- 579 FAQ
- 262 Nebula FAQ
- 160 Security FAQ
- 76 Switch FAQ
- 74 WirelessLAN FAQ
- 7 Consumer Product FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 69 About Community
- 46 Security Highlight