-
Notifications
You must be signed in to change notification settings - Fork 9
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
SSH support #7
Comments
Ideally it should be an optional dependency Maybe https://github.com/fgimian/paramiko-expect should be considered For interacting with telnet, pexpect is used What is important (too me) is to have code that works with telnet and (if optional depencies are necessary and installed) works with ssh I haven't test it mysef, but did you tried to pass cli parameter
See also class APCFactory Contributions are welcome |
I will give the cli argument a try. I think the only hangup then would be that the keys would then have to be published in the known_hosts file beforehand (something that paramiko handles very nicely for new/unknown entries). The paramiko-exspect would be a nice way to glue the SSH side to use the same code as the telnet side since the send/expect calls appear to be the same at first glance. I'll post what I discover. |
Hello Cmccluskey, I used the script and also would like to change telnet to ssh, but when I changed utility.py line 72 from "commandline = 'telnet %s' % host" to " commandline = 'ssh %s' % host" and tried running but got error: apc --statusAcquiring lock /tmp/apc.lock I think maybe the commandline is error, do you know how to change the commandline to ssh? Thank you so much. |
In our application for controlling our APC units we need to use SSH instead of Telnet. I think Paramiko or similar can be easily replace the Telnet in your current implementation, but does mean including of some heavy modules to support this. Any interest in including this?
The text was updated successfully, but these errors were encountered: