Licenced under a Python 2.2 style license. See License.txt.\r
"""\r
\r
-DEBUG_LEVEL = 0\r
+DEBUG_LEVEL = 1\r
\r
import os, getpass\r
import signal # should cause all KeyboardInterrupts to go to the main thread\r
self.port = port\r
self.isopen = 0\r
self.sshpid = 0 # perhaps merge this with isopen\r
- self.old_handler = signal.getsignal(signal.SIGCHLD)\r
- sig_handler = signal.signal(signal.SIGCHLD, self.sig_handler)\r
+ #self.old_handler = signal.getsignal(signal.SIGCHLD)\r
+ #sig_handler = signal.signal(signal.SIGCHLD, self.sig_handler)\r
\r
def __del__(self):\r
"""Destructor -- close the connection."""\r
Raises an mysshError if myssh.sshpath is not a file.\r
Raises an error if attempting to open an already open connection.\r
"""\r
- self.attach_agent()\r
+ #self.attach_agent()\r
+\r
if not os.path.isfile(self.sshpath):\r
raise mysshError, \\r
"Path to ssh or plink is not defined or invalid.\nsshpath='%s'" \\r
sshargs = '-ssh '\r
if self.port and self.port != '':\r
sshargs += PORT_STR + self.port + ' '\r
+ sshargs += " -o StrictHostKeyChecking=no -o PasswordAuthentication=yes -o PubkeyAuthentication=no "\r
if self.username and self.username !='':\r
sshargs += self.username + '@'\r
sshargs += self.host\r
if self.debuglevel:\r
print ">> Running %s %s." % (self.sshpath, sshargs)\r
# temporary workaround until I get pid's working under win32\r
+ print sshargs\r
if os.name == 'posix':\r
self.sshin, self.sshoutblocking, self.sshpid = \\r
sshpopen2(self.sshpath + ' ' + sshargs)\r