Zyxel XS1930-12HP SSH command over libssh (C++)
Hi,
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?
0
All Replies
-
Hi @Chris77,
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?
0 -
Hi @Chris77
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.
0 -
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 admin@192.168.0.10 show pwr
orssh admin@192.168.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
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 144 Nebula Ideas
- 94 Nebula Status and Incidents
- 5.6K Security
- 237 USG FLEX H Series
- 267 Security Ideas
- 1.4K Switch
- 71 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.3K Consumer Product
- 247 Service & License
- 384 News and Release
- 83 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.2K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 83 About Community
- 71 Security Highlight