Telnet into gateway from Python

Is is possible to telnet or SSH into the gateway from Python? It would be nice to be able to configure the gateway directly from Python.

If you mean python on the gateway into the gateway, see the documentation at:

If you mean python on a PC into remote gateway, then use the normal Python telnet library. We have example code here:

To clarify… the “digicli” module allows one to execute non-interactive Digi CLI commands on the running device without the need to create a socket connection or involve “telnet”.

What 52637p says is true - plus gateway-based Python code CAN open a telnet or ssh socket on localhost ( to have a real session. You’ll just need to deal with login and authentication.

Yet digicli allows you to call once to for example “read” the TCP keepalive settings. Then call a second time if you wish to change them. So you can gain the basic effect of interaction one small transaction at a time.