You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(6) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
|
2003 |
Jan
(8) |
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(4) |
Oct
(3) |
Nov
|
Dec
(5) |
2005 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
From: Ogz <com...@gm...> - 2005-06-29 07:02:15
|
I am using Debian Sarge- python 2.3.5 and i donwloaded the pyssh 2.3 deb package and installed it. connection =3D pyssh.Ssh(user, host, port) and i am sending connection.sendcmd("pwd") -> it works but after this line i have f =3D pyssh.os.popen("dmesg | grep DVD", "r") and then i am looking inside f by some string functions and in some part it starts to wait infinetely. When i use raw_input it stucked there. So i decided to use connection.close(). It continues working. the i opened connection: connection.open() After this change neither connection.send("pwd") nor other functions like chdir is not working. i can see password prompt but it doesnt wait there, it happens when i use sendcmd. I need a detail use of pyssh. How can i find people online. Like irc? Is there a channell that i can go and ask my questions? |
From: Travis B. <tb...@my...> - 2005-01-23 08:25:30
|
Twisted's API documentation for ssh/scp, said that the current implementations were still unstable. Drat. I was hoping my project would be compatible with CPyton as well as Jython, but now I'm resigned to a Jython-only implemenation that uses the j2ssh libs. Thanks for following up with all my questions. -Travis On Jan 22, 2005, at 6:39 AM, Mark W. Alexander wrote: > On Fri, Jan 21, 2005 at 03:20:27PM -0800, Travis Bear wrote: >> Can't import signal: >> >> [travis@tiny ~]$ cd jython-2.1/ >> [travis@tiny jython-2.1]$ ./jython >> Jython 2.1 on java1.5.0 (JIT: null) >> Type "copyright", "credits" or "license" for more information. >>>>> import signal >> Traceback (innermost last): >> File "<console>", line 1, in ? >> ImportError: no module named signal >>>>> >> >> From the JYthon docs, it wasn't clear but I inferred that not all >> builtins are supported: >> http://www.jython.org/docs/differences.html >> >> Perhaps signal use can be avoided or redone? > > Not without significant effort. signal is used to reap child processes > and prevent zombies which is a natural consequence of pyssh being a > wrapper around the ssh binaries. > > Google seems to indicate that Java, hence Jython, does not support > signals > (http://aspn.activestate.com/ASPN/Mail/Message/Jython-users/687321), > although I can't get the answer to that post to load. > > A quick Google for "jython twisted" seems to indicate that Twisted has > at least some support for Jython. Maybe you should give Twisted's conch > module a look. I'd be interested in what you find. > > mwa > -- > Mark W. Alexander > sl...@do... > > The contents of this message authored by Mark W. Alexander are > released under > the Creative Commons Attribution-NonCommercial license. Copyright of > quoted > materials, if any, are retained by the original author(s). > > http://creativecommons.org/licenses/by-nc/2.0/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Pyssh-discuss mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pyssh-discuss > > > _________________________________________________ > Scanned on 22 Jan 2005 15:07:59 > |
From: Mark W. A. <sl...@do...> - 2005-01-22 14:39:18
|
On Fri, Jan 21, 2005 at 03:20:27PM -0800, Travis Bear wrote: > Can't import signal: > > [travis@tiny ~]$ cd jython-2.1/ > [travis@tiny jython-2.1]$ ./jython > Jython 2.1 on java1.5.0 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> import signal > Traceback (innermost last): > File "<console>", line 1, in ? > ImportError: no module named signal > >>> > > From the JYthon docs, it wasn't clear but I inferred that not all > builtins are supported: > http://www.jython.org/docs/differences.html > > Perhaps signal use can be avoided or redone? Not without significant effort. signal is used to reap child processes and prevent zombies which is a natural consequence of pyssh being a wrapper around the ssh binaries. Google seems to indicate that Java, hence Jython, does not support signals (http://aspn.activestate.com/ASPN/Mail/Message/Jython-users/687321), although I can't get the answer to that post to load. A quick Google for "jython twisted" seems to indicate that Twisted has at least some support for Jython. Maybe you should give Twisted's conch module a look. I'd be interested in what you find. mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Travis B. <tb...@my...> - 2005-01-21 23:20:42
|
Can't import signal: [travis@tiny ~]$ cd jython-2.1/ [travis@tiny jython-2.1]$ ./jython Jython 2.1 on java1.5.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import signal Traceback (innermost last): File "<console>", line 1, in ? ImportError: no module named signal >>> From the JYthon docs, it wasn't clear but I inferred that not all builtins are supported: http://www.jython.org/docs/differences.html Perhaps signal use can be avoided or redone? -Travis On Jan 21, 2005, at 2:20 PM, Mark W. Alexander wrote: > On Fri, Jan 21, 2005 at 12:09:21PM -0800, Travis Bear wrote: >> Mark, >> >> This is a linux machine I'm working on (Fedora Core 3). The registry >> I >> was referring to was the Jython registry. If I am thinking about >> signal in the right way (SIGHUP, SIGKILL, etc) then there is no >> equivalent in the Windows world as far as I know. >> >> You say getpass and signal are standard python libraries. I found >> getpass in /usr/lib/python2.3, but where does signal usually live? As >> I said, a file search for "*signal*" didn't turn up anything that >> looked useful. > > Hmm... > > mwa@cougar:~$ python > Python 2.3.4 (#2, Jan 5 2005, 08:24:51) > [GCC 3.3.5 (Debian 1:3.3.5-5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import signal >>>> signal.__file__ > Traceback (most recent call last): > File "<stdin>", line 1, in ? > AttributeError: 'module' object has no attribute '__file__' >>>> > > Looks like it's a builtin. Can you just import it? > > mwa > -- > Mark W. Alexander > sl...@do... > > The contents of this message authored by Mark W. Alexander are > released under > the Creative Commons Attribution-NonCommercial license. Copyright of > quoted > materials, if any, are retained by the original author(s). > > http://creativecommons.org/licenses/by-nc/2.0/ > > > _________________________________________________ > Scanned on 21 Jan 2005 22:32:50 > |
From: Mark W. A. <sl...@do...> - 2005-01-21 22:20:39
|
On Fri, Jan 21, 2005 at 12:09:21PM -0800, Travis Bear wrote: > Mark, > > This is a linux machine I'm working on (Fedora Core 3). The registry I > was referring to was the Jython registry. If I am thinking about > signal in the right way (SIGHUP, SIGKILL, etc) then there is no > equivalent in the Windows world as far as I know. > > You say getpass and signal are standard python libraries. I found > getpass in /usr/lib/python2.3, but where does signal usually live? As > I said, a file search for "*signal*" didn't turn up anything that > looked useful. Hmm... mwa@cougar:~$ python Python 2.3.4 (#2, Jan 5 2005, 08:24:51) [GCC 3.3.5 (Debian 1:3.3.5-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import signal >>> signal.__file__ Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: 'module' object has no attribute '__file__' >>> Looks like it's a builtin. Can you just import it? mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Travis B. <tb...@my...> - 2005-01-21 20:09:32
|
Mark, This is a linux machine I'm working on (Fedora Core 3). The registry I was referring to was the Jython registry. If I am thinking about signal in the right way (SIGHUP, SIGKILL, etc) then there is no equivalent in the Windows world as far as I know. You say getpass and signal are standard python libraries. I found getpass in /usr/lib/python2.3, but where does signal usually live? As I said, a file search for "*signal*" didn't turn up anything that looked useful. Thanks! -Travis On Jan 21, 2005, at 5:28 AM, Mark W. Alexander wrote: > On Thu, Jan 20, 2005 at 10:51:23PM -0800, Travis Bear wrote: >> Sorry if this is a newb question, I've looked at all the documentation >> I can find, but so far no luck. If there is a better resource than >> this list, I'd be happy to know what it is. > > Not really. I recently took over as maintainer, and even more recently > found the documentation... > >> Does pyssh work in jython? > > I don't know. I haven't played much with Jython. But I'm game, if you > are ;) > >> I've struggled to get it going, with no luck. Is pyssh an >> implementation of the ssh protocol in python, or is it a wrapper for >> pre-existing, native ssh implementations? > > It's just a wrapper around the ssh binaries. I've stumbled on Twisted's > conch (www.twistedmatrix.com) and that appears to be a Python > implementation of the SSH prototcol, but I haven't dug very deep. > >> With c-python, everything seems to work fine. These are my efforts >> with jython so far: >> >> >> >>>>> import pyssh >> Traceback (innermost last): >> File "<console>", line 1, in ? >> ImportError: no module named pyssh >> >> so I modified the registry: >> python.path=/usr/lib/python2.3/site-packages > > Registry? Your on Windows? If so, you may be in trouble... From what > I've read, pyssh was written on *NIX for *NIX but again, I'm willing to > work on it. Since it's a wrapper, it would require a CLI Windows ssh > binary. What do you use for ssh now? > >>>>> import pyssh >> Traceback (innermost last): >> File "<console>", line 1, in ? >> File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 20, >> in ? >> ImportError: no module named getpass >> >> Ok that's a little better, but where is getpass? Doing a quick file >> search, I found one in /usr/lib/python2.3. Next registry change: >> >> python.path=/usr/lib/python2.3/site-packages:/usr/lib/python2.3 >> >>>>> import pyssh >> Traceback (innermost last): >> File "<console>", line 1, in ? >> File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 21, >> in ? >> ImportError: no module named signal > > getpass and signal are standard python modules, however I'm not sure if > signal is cross-platform. I'm Windows ignorant (by choice), but I think > signal is a POSIX feature. There may be a signal for Windows; I don't > know. I'll look when I get to a Windows box. > >> >> This was as far as I could get. A global file search showed nothing >> that looked useful. >> >> Thanks in advance, > > What? For _more_ not useful information ;) I'm interested in supporting > Jython, because I may have a future use for it anyway. I'd like to > support Windows, so if you are using Windows, then I'd appreciate any > suggestions/advice/testing you can provide. > > mwa > -- > Mark W. Alexander > sl...@do... > > The contents of this message authored by Mark W. Alexander are > released under > the Creative Commons Attribution-NonCommercial license. Copyright of > quoted > materials, if any, are retained by the original author(s). > > http://creativecommons.org/licenses/by-nc/2.0/ > > > _________________________________________________ > Scanned on 21 Jan 2005 13:28:29 > |
From: Mark W. A. <sl...@do...> - 2005-01-21 13:28:10
|
On Thu, Jan 20, 2005 at 10:51:23PM -0800, Travis Bear wrote: > Sorry if this is a newb question, I've looked at all the documentation > I can find, but so far no luck. If there is a better resource than > this list, I'd be happy to know what it is. Not really. I recently took over as maintainer, and even more recently found the documentation... > Does pyssh work in jython? I don't know. I haven't played much with Jython. But I'm game, if you are ;) > I've struggled to get it going, with no luck. Is pyssh an > implementation of the ssh protocol in python, or is it a wrapper for > pre-existing, native ssh implementations? It's just a wrapper around the ssh binaries. I've stumbled on Twisted's conch (www.twistedmatrix.com) and that appears to be a Python implementation of the SSH prototcol, but I haven't dug very deep. > With c-python, everything seems to work fine. These are my efforts > with jython so far: > > > > >>>import pyssh > Traceback (innermost last): > File "<console>", line 1, in ? > ImportError: no module named pyssh > > so I modified the registry: python.path=/usr/lib/python2.3/site-packages Registry? Your on Windows? If so, you may be in trouble... From what I've read, pyssh was written on *NIX for *NIX but again, I'm willing to work on it. Since it's a wrapper, it would require a CLI Windows ssh binary. What do you use for ssh now? > >>>import pyssh > Traceback (innermost last): > File "<console>", line 1, in ? > File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 20, > in ? > ImportError: no module named getpass > > Ok that's a little better, but where is getpass? Doing a quick file > search, I found one in /usr/lib/python2.3. Next registry change: > > python.path=/usr/lib/python2.3/site-packages:/usr/lib/python2.3 > > >>>import pyssh > Traceback (innermost last): > File "<console>", line 1, in ? > File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 21, > in ? > ImportError: no module named signal getpass and signal are standard python modules, however I'm not sure if signal is cross-platform. I'm Windows ignorant (by choice), but I think signal is a POSIX feature. There may be a signal for Windows; I don't know. I'll look when I get to a Windows box. > > This was as far as I could get. A global file search showed nothing > that looked useful. > > Thanks in advance, What? For _more_ not useful information ;) I'm interested in supporting Jython, because I may have a future use for it anyway. I'd like to support Windows, so if you are using Windows, then I'd appreciate any suggestions/advice/testing you can provide. mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Travis B. <tb...@my...> - 2005-01-21 06:51:32
|
Sorry if this is a newb question, I've looked at all the documentation I can find, but so far no luck. If there is a better resource than this list, I'd be happy to know what it is. Does pyssh work in jython? I've struggled to get it going, with no luck. Is pyssh an implementation of the ssh protocol in python, or is it a wrapper for pre-existing, native ssh implementations? With c-python, everything seems to work fine. These are my efforts with jython so far: >>> import pyssh Traceback (innermost last): File "<console>", line 1, in ? ImportError: no module named pyssh so I modified the registry: python.path=/usr/lib/python2.3/site-packages >>> import pyssh Traceback (innermost last): File "<console>", line 1, in ? File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 20, in ? ImportError: no module named getpass Ok that's a little better, but where is getpass? Doing a quick file search, I found one in /usr/lib/python2.3. Next registry change: python.path=/usr/lib/python2.3/site-packages:/usr/lib/python2.3 >>> import pyssh Traceback (innermost last): File "<console>", line 1, in ? File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 21, in ? ImportError: no module named signal This was as far as I could get. A global file search showed nothing that looked useful. Thanks in advance, -Travis Bear |
From: Mark W. A. <sl...@do...> - 2004-12-22 18:02:40
|
Reply with cc: to the archives.. Yes, "session.login(password="myS3cret")" would be a way to do it with passwords. Seems there's lots of alternative ways of doing things. Thanks for clearing up one of them ;) mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ On Wed, Dec 22, 2004 at 10:06:46AM +0100, Niklas Saers wrote: > Hi Mark, > > >Hi, I'm the new maintainer and .. What?! There's documentation? > >Oh, there it is... > > > > > :) > > >Yup, that's what it says, but that's not the way it is :( > >I'll add it to my todo list to bring it up-to-date. > > > > > Sounds lovely. Although now people have an entry on the mailinglist to > read. :-) > > >pyssh.py went away when pyssh was restructured as a python package. It > >didn't really go any where, it just got renamed to __init__.py and > >pushed under the pyssh directory. When you "import pyssh", the > >__init__.py is what actually gets loaded. > > > > > Ah :-) > > >To your question, the way it works now is to instantiate an Ssh object: > > > > > Thank you very much. :-) (until that documentation thingy comes in > place, if someone else should happen to read the thread, you might want > to use "session.login(password="myS3cret")" to login with passwords. > > Thanks for your help :-) > > Cheers > > Nik |
From: Mark W. A. <sl...@do...> - 2004-12-21 22:55:34
|
On Tue, Dec 21, 2004 at 03:19:01PM +0100, Niklas Saers wrote: > Hi, I've tried following the docs for pyssh, but I cannot get a client > started. Both 0.3 and CVS install fssa, nbpipe and ptyext only when > doing python setup.py install, no pyssh. I cannot find a pyssh.py in the > distribution either. And when I do Hi, I'm the new maintainer and .. What?! There's documentation? Oh, there it is... > import pyssh > pyssh.run('date', host='HOSTNAME', user='USERNAME', password='PASSWORD') Yup, that's what it says, but that's not the way it is :( I'll add it to my todo list to bring it up-to-date. > I get module has no attribute run. What I'd like to do is to test that > an ssh connection to a host can be made with passwordbased > authentication, for example by running "echo SUCCESS" on the client side. > > If the documentation is out of date, how do I do this with the current > implementation? If the documentation is correct, what am I missing? > Where is pyssh.py? pyssh.py went away when pyssh was restructured as a python package. It didn't really go any where, it just got renamed to __init__.py and pushed under the pyssh directory. When you "import pyssh", the __init__.py is what actually gets loaded. To your question, the way it works now is to instantiate an Ssh object: import pyssh session = pyssh.Ssh(username='me', host='remotehost') session.login() session.sendcmd("date") If there's an ssh-agent running for user 'me' (which if omitted, defaults to the executing user), pyssh will attempt to attach and use that agent. If this happens, you will _not_ get the password prompt you're expecting at login(), it will just work. Otherwise, it should do as you suspect. HTH! mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Niklas S. <ni...@re...> - 2004-12-21 14:19:07
|
Hi, I've tried following the docs for pyssh, but I cannot get a client started. Both 0.3 and CVS install fssa, nbpipe and ptyext only when doing python setup.py install, no pyssh. I cannot find a pyssh.py in the distribution either. And when I do import pyssh pyssh.run('date', host='HOSTNAME', user='USERNAME', password='PASSWORD') I get module has no attribute run. What I'd like to do is to test that an ssh connection to a host can be made with passwordbased authentication, for example by running "echo SUCCESS" on the client side. If the documentation is out of date, how do I do this with the current implementation? If the documentation is correct, what am I missing? Where is pyssh.py? Cheers Niklas Saers |
From: Mark W. A. <sl...@do...> - 2004-12-08 20:03:15
|
On Tue, Dec 07, 2004 at 08:39:30PM -0800, Jay H wrote: > Hi All, > > I just joined the list. I really need to find examples of how to use > pyssh to perform scp file transfers with a password. I downloaded the > pyssh files and ran the setup.py but I can't find any examples of how > to use the code. Could someone show how to effect an scp transfer, > for instance > > scp ro...@my...:/usr/local/tmp/* . > > with the pyssh module? Welcome! I've only recently took over as maintainer, but from what I can see there is no "real" support for scp at all. I suspect no effort has been expended because it's really as simple as: import os os.system("scp ro...@my...:/usr/local/tmp/* .") This will trigger the default passphrase/password interaction, just as if you had done the scp from the command line. If you want to do an scp withOUT a password, you can use ssh-agent and keys. You can use the new fssa module to have a batch/cron job connect to a running agent (see http://www.ucolick.org/~sla/ssh/sshcron.html for the mechanics). To do this with pyssh: import pyssh, os pyssh.fssa.fssa() os.system("scp ro...@my...:/usr/local/tmp/* .") ("from pyssh.fssa import fssa" also works fine if that's all you need.) The call to fssa() will find a running agent for the executing user and attach to it. Since you want to access the remote machine as root, you really should use keys. It's best to not allow any root access via ssh. It's better to only allow root access with keys. It's not real safe (least best? - but better than non-ssh alternatives) to allow root access with password access (the "defense in depth" security principle). Note that it's possible to have a "user" key allowed to ssh to root by putting the user key in root's "authorized_keys" file. (Something I wouldn't do on the big, bad, Internet but I do to certain machines on my home network ;) If this is not what you're looking for, let me know how you'd like it to work and we'll work it out. I just haven't hit the need for scp functionality _yet_. Also, I'm curious: What platform are you using? I'm trying to provide packaged binaries for "popular" platforms, so if you ran setup.py, I missed yours! mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Jay H <mic...@gm...> - 2004-12-08 04:39:37
|
Hi All, I just joined the list. I really need to find examples of how to use pyssh to perform scp file transfers with a password. I downloaded the pyssh files and ran the setup.py but I can't find any examples of how to use the code. Could someone show how to effect an scp transfer, for instance scp ro...@my...:/usr/local/tmp/* . with the pyssh module? Thanks! J. |
From: Mark W. A. <sl...@do...> - 2004-10-19 18:14:31
|
FYI, I've committed Adam Allen's patch https://sourceforge.net/tracker/index.php?func=detail&aid=1022628&group_id=33947&atid=409712 to CVS. This patch allows control over whether to allow the acceptance of new host keys or not. By default, new host keys are accepted. Thanks Adam! I've also added a check for "Host key verification failed" in the initial banner exchange. Since this could be an indication of a man-in-the-middle attack, it raises a HostVerificationFailure exception. Unless captured, this will terminate any connection without providing any user over-ride capability. Instead, the warning banner is produced along with the exception forcing the proper corrective action which is to verify/correct the keys. This is consistent with, but a little more gracefull than, the current behavior which requires a user response before bombing out (at least with strict host checking on). Note that these changes are in the default prompt_callback function, so this behavior can be over-ridden by a caller specified prompt_callback. If anyone is using custom prompt_callback functions, I'd appreciate an education as to why it was necessary for you to use one. I do not plan a new file release for these changes. If you want these features, please pull the latest from anonymous cvs. My target for the next file release is an expect() function comparable to telnetlib's. I'm still feeling my way around the details of the code, but my goal is for PySSH to be a drop-in replacement (e.g. API compatible) with telnetlib. Comments, suggestions, and cautions are appreciated. mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Rasjid W. <ra...@op...> - 2004-10-16 00:36:10
|
On Saturday 16 October 2004 04:49, Mark W. Alexander wrote: > Greetings PySSH'ers, > > You may have noticed that I sent a few messages about enhancements > recently. Rasjid responded, noting that he is currently unable to > continue working much with PySSH and asked me to carry on carryin' on. > I'm honored to accept, so meet your new maintainer ;) Thank you Mark for taking this on. Have fun, Rasjid. -- Rasjid Wilcox Canberra, Australia (UTC +10 hrs) http://www.openminddev.net |
From: Mark W. A. <sl...@do...> - 2004-10-15 18:49:43
|
Greetings PySSH'ers, You may have noticed that I sent a few messages about enhancements recently. Rasjid responded, noting that he is currently unable to continue working much with PySSH and asked me to carry on carryin' on. I'm honored to accept, so meet your new maintainer ;) The enhancements have been commited to CVS. Note that this involved a major restructuring of the CVS directory structure, so if you should ever need to go back to 0.2, it is tagged with the un-imaginative name "Release-0dot2". The Files page has also been updated with release 0.3 and includes binary Debian and RPM packages, along with source in zip and tar.gz archives. I have not tested the RPM, so any feed back would be appreciated. It's built for Python 2.3. See the Release Notes for specifics about changes. Nothing what-so-ever has been tested on Windows or Cygwin. I'm curious, though: What platforms are people using PySSH on? The more I'm aware of, the better I'll try to verify they work properly for future releases. mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Rasjid W. <ra...@op...> - 2004-09-27 00:02:04
|
On Thursday 23 September 2004 02:26, Mark W. Alexander wrote: > Anybody else here? Hi Mark, Yes, there is at least me here. I am currently on holidays, and am about to enter the throws of moving to a new city and a new job. So my attention has been elsewhere, and probably will be so for a little while (the next month or two at least). Cheers, Rasjid. -- Rasjid Wilcox Canberra, Australia (UTC +10 hrs) http://www.openminddev.net |
From: Mark W. A. <sl...@do...> - 2004-09-22 16:27:00
|
Anybody else here? On Tue, Sep 21, 2004 at 05:43:50PM -0400, Mark W. Alexander wrote: > Oh, what the heck, I like it, so: > > http://dotnetslash.net/static/pyssh.zip > > Changes: > * restructured as a python package > * added setup.py for Distutils > * added debian control directory for producing .debs > There's no Distutils support for Debian, yet. debian/rules > creates a package matching the version of python specified by > the PYTHON variable. The version number is extracted from setup,py. > The only time anything should need to be modified is if packages > are needed for multiple versions of python. If so, they can be > created by changing the PYTHON variable (i.e. PYTHON=python2.2) > and re-run `debian/rules binary` to make a python2.2-pyssh .deb > * added module fssa (Find Secure Shell Agent) to allow > batch jobs to connect to a previously authenticated > ssh-agent and run without intervention (posix only) I used a pyssh batch job last night to monitor a box that has been seemingly going to "sleep" on us. The first symptom is that ssh logins take forever, so pyssh was perfect for the job, and it worked well. Except.... When I came in this a.m., my workstation (where I was running the pyssh "probe" script) was dog slow. There were hundreds of zombie ssh processes that pyssh apparently was not reaping. I've added signal handling to the Ssh class to trap SIGCHLD. The signal handler retains any previously user specified signal handler, does an os.waitpid on the sshpid, then calls the original user specified handler. This eliminates the zombies. Note that I have not actually tested with a previously set signal handler. Although it should work, if it doesn't I suspect anyone who's doing signal handling can deal with any problems it exposes. The zip file at the above location has been updated. I also want to note that fssa.py is a direct port from Steve Allen's fsa.sh shell version discussed at http://www.ucolick.org/~sla/ssh/sshcron.html Direct link to script: http://www.ucolick.org/~sla/ssh/fsa It could be improved by using walk instead of getoutput(`find`), but this way was quick and It Works For Me(TM) ;) Thanks again on your work on this. It came in very handy. mwa -- Mark W. Alexander sl...@do... |
From: Mark W. A. <sl...@do...> - 2004-09-21 21:43:53
|
On Tue, Sep 21, 2004 at 02:56:22PM -0400, Mark W. Alexander wrote: > Hi, > > Just starting to play with pyssh. I see you want a setup.py. I can > probably do one fairly easily. Do you want the modules re-structured as > a package, e.g. pyssh/__init__.py, with nbpipe and ptyext underneath? > (That's what I recommend to maintain your own namespace.) Oh, what the heck, I like it, so: http://dotnetslash.net/static/pyssh.zip Changes: * restructured as a python package * added setup.py for Distutils * added debian control directory for producing .debs There's no Distutils support for Debian, yet. debian/rules creates a package matching the version of python specified by the PYTHON variable. The version number is extracted from setup,py. The only time anything should need to be modified is if packages are needed for multiple versions of python. If so, they can be created by changing the PYTHON variable (i.e. PYTHON=python2.2) and re-run `debian/rules binary` to make a python2.2-pyssh .deb * added module fssa (Find Secure Shell Agent) to allow batch jobs to connect to a previously authenticated ssh-agent and run without intervention (posix only) Let me know if there's any problems. Also let me know when you've grabbed it so I can delete it. I don't want it to linger there unmaintained while the official version moves forward. Thanks! mwa -- Mark W. Alexander sl...@do... |
From: Mark W. A. <sl...@do...> - 2004-09-21 18:56:28
|
Hi, Just starting to play with pyssh. I see you want a setup.py. I can probably do one fairly easily. Do you want the modules re-structured as a package, e.g. pyssh/__init__.py, with nbpipe and ptyext underneath? (That's what I recommend to maintain your own namespace.) mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Rasjid W. <ra...@op...> - 2004-08-07 14:41:35
|
On Friday 23 July 2004 06:15, William Baxter wrote: > Does anyone have any experience with SGIs? I'm running pyssh-0.2 > (Python2.3) on Irix 6.5, trying to ssh to Linux. The test program works > fine connecting and sending commands, but it hangs when the connection's > close function is called. The offending line seems to be > self.sshoutblocking.close() in pyssh.py My appologies for the delay in responding. AFAIK, PySSH has really only been tested on Linux, and to a limited extent on Windows (using Putty or via Cygwin). With SGIs I think you are on your own. :-( > Has anyone else encountered this problem? > > P.s. why is pyssh so slow to return from each command? Look at the nbpipe code. What is the status of the sleep funciton in Python on SGI? Can it do fractions of a second? If not, that is your problem. Otherwise, I'm not sure at the moment. Sorry I can't be of more help. Cheers, Rasjid. -- Rasjid Wilcox Canberra, Australia (UTC +10 hrs) http://www.openminddev.net |
From: William B. <bb...@wa...> - 2004-07-22 20:16:04
|
Does anyone have any experience with SGIs? I'm running pyssh-0.2 (Python2.3) on Irix 6.5, trying to ssh to Linux. The test program works fine connecting and sending commands, but it hangs when the connection's close function is called. The offending line seems to be self.sshoutblocking.close() in pyssh.py Has anyone else encountered this problem? Thanks, Bill B. P.s. why is pyssh so slow to return from each command? -- William T. Baxter Wadsworth Center Empire State Plaza, PO Box 509 Albany, NY 12201-0509 |
From: Rasjid W. <ra...@op...> - 2003-11-28 14:39:54
|
On Friday 28 November 2003 00:53, Anders Eriksson wrote: > Hello! > > I have just discovered Pyssh 0.2 and I like it! > > There are some things that I can't get to work so I thought I ask you about > it! > > I need to automate creating a ssh connection, running some commands, > checking the results of the commands and then respond depending on the > result, and then closing the connection. This will then be repeated every > two minutes... > > So entiring a password isn't something I want to do every two minutes! > > One of the cool things about Putty and Plink is that I can save a session > and then use the session instead of specifying all params on the command > line. Unfortunally Pyssh doesn't support this. > > I have added this functionallity but I can't get it to take a passphrase. I > don't understad how the login is handled... > > Would someone please explain how Ssh::login works! > logintext what is it used for? I get the question about passphrase before > 'Last login:' > > I'm running Python 2.3 on Windows 2000 > The server is a SunOS 5.8 The login text is the text that the login function looks for that means it stops looking for password prompts / ssh questions etc. It should be set to be the last text before the bash prompt. To achieve the effect you want, just pass a new 'prompt_callback' function to the command. For starts, make a copy of the current _prompt function, and modify it so that it returns the text you want. Is this enough help? If not, let me know and I'll try and explain in more detail. Cheers, Rasjid. -- Rasjid Wilcox Canberra, Australia (UTC +10 hrs) http://www.openminddev.net |
From: Anders E. <and...@mo...> - 2003-11-27 13:54:01
|
Hello! I have just discovered Pyssh 0.2 and I like it! There are some things that I can't get to work so I thought I ask you about it! I need to automate creating a ssh connection, running some commands, checking the results of the commands and then respond depending on the result, and then closing the connection. This will then be repeated every two minutes... So entiring a password isn't something I want to do every two minutes! One of the cool things about Putty and Plink is that I can save a session and then use the session instead of specifying all params on the command line. Unfortunally Pyssh doesn't support this. I have added this functionallity but I can't get it to take a passphrase. I don't understad how the login is handled... Would someone please explain how Ssh::login works! logintext what is it used for? I get the question about passphrase before 'Last login:' I'm running Python 2.3 on Windows 2000 The server is a SunOS 5.8 // Anders |
From: Rasjid W. <ra...@op...> - 2003-05-02 10:39:21
|
For the record, David's solution is exactly what I created the prompt_callback parameter for, and is certainly the kind of solution I had in mind. My appologies to Christian, as I think I simply missed that part his email when reading it, and thank you to David for a solution. Cheers, Rasjid. On Friday 02 May 2003 19:16, David Schachter wrote: > In <http://sourceforge.net/mailarchive/forum.php?thread_id=1560324&forum_id=705>, Christian Laubscher asked: > >Another question (I know that this is bad style, but I'd like to do it > > anyway): can I hand ssh the password as a variable? How? > > I did this by passing a different function into Ssh.login(). The function > is defined like this: def login(self, logintext='Last login:', > prompt_callback=_prompt) > > where _prompt is a helper function to handle the login dialog. I provided > my own function, myPrompt(), using the _prompt() function as a starting > point. Here's an example program, run on Microsoft Windows 2000, based on > Christian's example: import pyssh > import sys > > if len(sys.argv) != 4: > print """Usage: example2 <hostname> <username> <password> > > Example: example2 fred.acme.com zaphod beeblebrox""" > sys.exit(1) > > hostG = sys.argv[1] > userG = sys.argv[2] > passwordG = sys.argv[3] > > > def myPrompt(prompt): > """Print the message as the prompt for input. Return the text entered.""" > > abort = 0 > > lprompt = prompt.lower() > if lprompt.find("password:") >= 0 or lprompt.find("passphrase:") >= 0: > # print "Found password request in '%s'." % prompt > response = passwordG > > else: > print "User input required for ssh connection. (Type Ctrl-C to abort > connection.)" try: > response = raw_input(prompt) > > except KeyboardInterrupt: > response = "" > abort = 1 > > return response, abort > > > mycon = pyssh.Ssh(userG, hostG, "22") > mycon.set_debuglevel(1) > mycon.set_sshpath("c:/progra~1/putty/plink.exe") > mycon.login("Last login:", myPrompt) > > for command in ("ls", "ps", "ps auxw | grep httpd | grep -v grep ; echo > $?", "exit"): print "\n%%", command > print mycon.sendcmd(command) > mycon.close() -- Rasjid Wilcox Canberra, Australia UTC + 10 http://www.openminddev.net |