Skip to content Skip to sidebar Skip to footer

Ssh Persistent Connection Using Pxssh In Flask

I am working on web interface to run command on remote servers using pxssh. Is there anyway I can create persistent ssh connection, below code calls connect_ssh for every request.

Solution 1:

Try calling:

ssh = connect_ssh()

only once under "app = Flask()" line and rerun it and it will run only once.

Post a Comment for "Ssh Persistent Connection Using Pxssh In Flask"