Help with socket staus

Miley, Shain SMiley at czn.com
Wed Mar 9 12:33:19 EST 2005


Hello,
First let me say hello since I am new to this list.  

Recently I downloaded and installed the c3 suite of python2 scripts so that I can execute commands on multiple unix nodes.  What I am looking to do is determine when an ssh connection fails (either sshd has been stopped, the node is not in service, etc).  I have been unable to find good documentation to help me resolve this issue.  The message that I receive when ssh fails is this:

ssh: connect to host test.node.com port 22: Connection refused

So I guess my question is this...are there any methods to determine the state of a socket connection (i.e connected, no connected, connection failed, etc).

Thanks in advance,

Shain





More information about the Python-list mailing list