From: Bijoy T. <bij...@gm...> - 2008-05-20 14:39:08
|
Hi, Has anyone tried using pyssh on Mac OS X? I installed it and gave it a trial run but encountered an error for a missing "/proc" (which OS X doesnt have). I editied the attach_agent() method to return without calling fssa.fssa(key) in the hope that I could manually enter the passwd. My test code is from pyssh import * testcon = Ssh('thomas', 'mongo.cebatech.com', '22') testcon.set_debuglevel(1) testcon.set_sshpath(SSH_PATH) testcon.login() print testcon.sendcmd('date') testcon.close() Running this simply hangs after printing a debug line "Running /usr/bin/ssh -p 22 th...@mo...." I hit Ctrl-C Keyboard Interrupt to kill it and have pasted the traceback. $python ssh.py >> Running /usr/bin/ssh -p 22 th...@mo.... ^C>> ssh pid is 2808. ^CTraceback (most recent call last): File "ssh.py", line 6, in <module> testcon.login() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyssh/__init__.py", line 254, in login print ">> 1st banner read is: %s" % banner File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyssh/__init__.py", line 236, in read_some return self.sshout.read_very_lazy() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyssh/nbpipe.py", line 110, in read_some data += self.read_lazy(maxblocks - 1, timeout) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyssh/nbpipe.py", line 98, in read_lazy time.sleep(MIN_TIMEOUT) KeyboardInterrupt >> Sending >> 1 characters taken >> Sending ~. >> 2 characters taken ^C $ Am I doing something wrong or is this something to do with OS X? The README mentions that time.sleep() has issues. Perhaps something to do with that? Thanks, Bijoy. -- "The task AHEAD of you is never as great as the POWER behind you" |