By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

Reuse ssh connection created using pxssh

P: 1
Hi,

I am using pxssh to create an ssh connection with a server. this pxssh is defined in a script called session.py. in session.py i create an ssh connection and then send commands to be executed in that session and after execution of commends it will exit the ssh connection.

Now i am calling this script using subprocess.call() ,from master script called testrunner.py.

this testrunner.py calls sessioon.py again and again for eac test case. so for each testcases ssh is created and commands are executed.

I want that ssh creation happens only for 1st test case (i.e. when session.py is called for first time) and for subsequent calls it uses the same session.

is it possible to do like this?
Feb 25 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.