-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for SSH exec #23
Comments
Cheers @ddutt, suspect its an issue detecting the carrige return used by asyncssh, will do some testing and update further in a few days |
Hi @tbotnz I wrote a program myself as I need it mostly for testing devops, not user interaction. I ran into the same problem with using asyncssh server as I did with your code. I finally got everything working when I started handling exec_requested instead of only shell_requested as my program was open an SSHSession to execute a single command, not a shell. Hope this helps. I can share my python code easily if that makes a difference. Thanks for responding, |
Reproduced with asyncssh (python) as below, not working
working ( with async ssh in shell mode )
This seems to confirm @DDuttS theory about no support for exec mode, |
Hi,
Thank you for providing this useful package.
I can't seem to get any command to be returned if I use asyncssh. If I connect manually, it seems to work fine. I have asyncssh working without anything fancy across Cisco's NXOS, Arista, Juniper, Linux and so on. Would you be able to provide any hints as to why this might be happeniing or help me fix this?
The connection succeeds (as per asyncssh logs, and I see the same with cissshgo's output), but the command "show version" just hangs. I'm attaching the debug log from asyncssh if its of some value.
Thanks,
Dinesh
2021-01-12 08:09:35,175 - asyncssh - INFO - Opening SSH connection to localhost, port 10000
2021-01-12 08:09:35,186 - asyncssh - INFO - [conn=0] Connection to localhost, port 10000 succeeded
2021-01-12 08:09:35,186 - asyncssh - INFO - [conn=0] Local address: 127.0.0.1, port 34924
2021-01-12 08:09:35,186 - asyncssh - DEBUG - [conn=0] Requesting key exchange
2021-01-12 08:09:35,187 - asyncssh - DEBUG - [conn=0] Received key exchange request
2021-01-12 08:09:35,192 - asyncssh - DEBUG - [conn=0] Beginning key exchange
2021-01-12 08:09:35,199 - asyncssh - DEBUG - [conn=0] Completed key exchange
2021-01-12 08:09:35,200 - asyncssh - INFO - [conn=0] Beginning auth for user admin
2021-01-12 08:09:35,202 - asyncssh - DEBUG - [conn=0] Trying password auth
2021-01-12 08:09:35,204 - asyncssh - INFO - [conn=0] Auth for user admin succeeded
2021-01-12 08:09:35,204 - suzieq.poller.nodes.node - INFO - Connected to localhost at 1610467775.2045498
2021-01-12 08:09:35,205 - asyncssh - DEBUG - [conn=0, chan=0] Set write buffer limits: low-water=16384, high-water=65536
2021-01-12 08:09:35,205 - asyncssh - INFO - [conn=0, chan=0] Requesting new SSH session
2021-01-12 08:09:35,207 - asyncssh - INFO - [conn=0, chan=0] Command: show version
2021-01-12 08:09:45,217 - suzieq.poller.nodes.node - ERROR - Unable to connect to localhost show version due to timeout
The text was updated successfully, but these errors were encountered: