Re: [paramiko] Unknown private key cipher AES-128-CBC

2010-09-09 Thread James Bardin
On Wed, Sep 8, 2010 at 6:49 PM, Robey Pointer robeypoin...@gmail.com wrote: It may be as simple as adding another line to the top of pkey.py, in the _CIPHER_TABLE:        'AES-128-CBC': { 'cipher': AES, 'keysize': 16, 'blocksize': 16, 'mode': AES.MODE_CBC } Could you try that and let me

Re: [paramiko] Unknown private key cipher AES-128-CBC

2010-09-07 Thread James Bardin
be particularly unusual. Is this a bug with the distribution? Is there some library missing? AFAIK, openssh currently only supports des3 as well, and the ssh-keygen program has no options to specify cipher. I'm guessing that you used another tool (like openssl) to generate your key file. -jim -- James

Re: [paramiko] Handling of badly behaved server

2010-08-12 Thread james bardin
to work asynchronously. -jim -- James Bardin jbar...@bu.edu Systems Engineer Boston University IST ___ paramiko mailing list paramiko@lag.net http://www.lag.net/cgi-bin/mailman/listinfo/paramiko

Re: [paramiko] select not returning in error.

2010-07-20 Thread james bardin
On Tue, Jul 20, 2010 at 2:10 PM, jd jdsw2...@yahoo.com wrote: Anyone has ideas for this issue  ? I see the condition you are demonstrating, but I'm not sure I understand what you're asking. The channel acts like a socket. Selecting on a closed socket 's', gives the same result:

Re: [paramiko] Multithreading

2010-07-01 Thread james bardin
On Thu, Jul 1, 2010 at 12:06 PM, Nikolaus Rath nikol...@rath.org wrote: You can share it, like you can share anything you want between threads, you need proper locking, as the client only has one channel for communication. Since I can share anything I want if I synchronize access to it

Re: [paramiko] Multithreading

2010-06-30 Thread james bardin
On Wed, Jun 30, 2010 at 11:13 AM, Marcin Krol mrk...@gmail.com wrote: Obviously, all the normal caveats about multithreading apply: remembering to sleep just in case after releasing locks to prevent starvation I never heard of that. Could you explain in more detail what you mean?

Re: [paramiko] Exception in thread Thread-1 (most likely raised during interpreter shutdown) using 1.7.6

2010-03-26 Thread james bardin
On Fri, Mar 26, 2010 at 11:32 AM, ken cochrane kencochr...@gmail.com wrote: python: 2.5.4 paramiko: 1.7.6 pycrypto: 2.1.0 Django: 1.1.1 Although I don't know specifically what's going on, I do know that it doesn't happen in either python2.4 or python 2.6, so it may be a python2.5 bug. -jim

Re: [paramiko] What is the correct way to implement reconnect

2010-03-17 Thread james bardin
On Wed, Mar 17, 2010 at 6:47 AM, Roman Yakovenko roman.yakove...@gmail.com wrote: Hello. I am trying to implement reconnect functionality for my class. I would like to ping to a remote machine, using opened transport if ping fails for any reason, then to recreate the whole SSHClient object

Re: [paramiko] What is the correct way to implement reconnect

2010-03-17 Thread james bardin
On Wed, Mar 17, 2010 at 3:44 PM, Roman Yakovenko roman.yakove...@gmail.com wrote: transport.is_active() should report the condition of the ssh transport correctly. If the remote host simply stops responding and doesn't close the connection properly, there's is no way to detect it without

Re: [paramiko] Handling the background thread

2010-03-14 Thread james bardin
On Sun, Mar 14, 2010 at 7:31 PM, Nikolaus Rath nikol...@rath.org wrote: I'm running  1.7.4-0.1 (Ubuntu Karmic). Do you know in which version this changed? changed in commit 25417575. I think the next release was 1.7.5 ___ paramiko mailing list

Re: [paramiko] Handling the background thread

2010-03-13 Thread james bardin
On Sat, Mar 13, 2010 at 7:08 PM, Nikolaus Rath nikol...@rath.org wrote: Hello, Is there a way to convince Paramiko to start its background thread as a daemon thread, so that it does not prevent the interpreter from terminating? Are you running the latest version? The transport threads have

Re: [paramiko] Surviving fork()

2010-03-01 Thread james bardin
On Mon, Mar 1, 2010 at 8:25 AM, Nikolaus Rath nikol...@rath.org wrote: Hello, I would like to keep an established ssh connection when daemonizing, i.e. when calling fork(). Is there a way to do this? I suppose paramiko would have to run either single threaded, or have to recreate its

Re: [paramiko] CPU usage while connecting

2010-02-10 Thread james bardin
On Wed, Feb 10, 2010 at 7:13 AM, Marcin Krol mrk...@gmail.com wrote: Semi-good news/bad news routine: Bad news: Unfortunately the above doesn't seem to work, as Transport().close method doesn't want to cooperate (I get this while talking to that slow Solaris host). That is, I do: def

Re: [paramiko] Using invoke_shell to su root

2010-02-05 Thread james bardin
On Thu, Feb 4, 2010 at 9:30 PM, Wan Li wanli...@gmail.com wrote: So is there a way to su root only one time to make each exec_command take the advantage of root privilege? Yes. You can use sudo. I personally prefer to use a root (or admin+sudo) account which can only login with a publickey,

Re: [paramiko] SCPClient slower than scp

2010-02-01 Thread james bardin
On Mon, Feb 1, 2010 at 2:52 AM, Roman Yakovenko roman.yakove...@gmail.com wrote: Hello. I am using SCPClient class from branch( http://bazaar.launchpad.net/~jbardin/paramiko/paramiko_scp/annotate/500?file_id=scp.py-20081117202350-5q0ozjv6zz9ww66y-1 ) with paramiko 1.7.6 and Python 2.6 on

Re: [paramiko] SCPClient slower than scp

2010-02-01 Thread james bardin
On Mon, Feb 1, 2010 at 11:49 AM, Roman Yakovenko roman.yakove...@gmail.com wrote: You would normally start by using a profiler to see where the performance bottleneck is, before you start speculating. You would have seen that most of the time is spent in paramiko.Transport manipulating data,

Re: [paramiko] SCPClient slower than scp

2010-02-01 Thread james bardin
On Mon, Feb 1, 2010 at 12:16 PM, james bardin jbar...@bu.edu wrote: Yes, the solution written entirely in c will be significantly faster. Since this is mostly python, cpu is the limiting factor. I have zero experience in ssh and encryption, but my expection was that at least in the case

Re: [paramiko] alternate ciphers

2010-01-27 Thread james bardin
On Wed, Jan 27, 2010 at 6:40 AM, Marcin Krol mrk...@gmail.com wrote: ### import paramiko import socket s = socket.socket() s.connect(('localhost', 22)) t = paramiko.Transport(s) t.get_security_options().ciphers = ('arcfour128',) t.connect . Regardless of what I set  as

Re: [paramiko] remote command info

2010-01-27 Thread james bardin
On Tue, Jan 26, 2010 at 5:20 PM, stefano landucci marlonba...@gmail.com wrote: Hi, I'm a paramiko's newbie. I started with a simple ssh connection and command execution like below: import sys import paramiko client = paramiko.SSHClient() client.load_system_host_keys() ip = 'ip_server'

Re: [paramiko] alternate ciphers

2009-12-31 Thread james bardin
On Thu, Dec 31, 2009 at 11:19 AM, Marcin Krol mrk...@gmail.com wrote: Hello, I'm using paramiko to concurrently distribute large files/dirs to many hosts. This is heavy on CPU. Is there any way to say to SSHClient or channel or transport what cipher to use? Which one would be recommended

Re: [paramiko] adding a handler to the paramiko loggers

2009-12-14 Thread james bardin
On Sun, Dec 13, 2009 at 10:01 PM, Moritz Beber moritz.be...@googlemail.com wrote: I can add a handler of my choosing to the Transport.logger but then something strange happens: I get duplicate entries on stdout. I checked the list of handlers for Transport.logger and it contains only one

Re: [paramiko] Paramiko SSHClient

2009-12-04 Thread james bardin
2009/12/4 Petrucci Andreas petrucci_2...@hotmail.com A quite strange thing is that with this specific host most of the time the connection is established successfully but sometimes the above SSHException occurs. From my perspective, it's not up to me to correct this, am I right? Yes, this

Re: [paramiko] Paramiko SSHClient

2009-12-04 Thread james bardin
On Fri, Dec 4, 2009 at 3:19 PM, Petrucci Andreas petrucci_2...@hotmail.com wrote: it's a PlanetLab node, and i have this problem with all PlanetLab nodes that i cope with. I mean what is the ssh-server/OS? Does other sftp clients work (like sftp from openssh)?

Re: [paramiko] Paramiko SSHClient

2009-12-04 Thread james bardin
On Fri, Dec 4, 2009 at 4:19 PM, Petrucci Andreas petrucci_2...@hotmail.com wrote: OpenSSH_4.7p1, OpenSSL 0.9.8b 04 May 2006 Fedora release 8 2.6.22.19 You may not have any control over this, but Fedora 8 has been out of support for a year now. I tried with filezilla and sftp but no

Re: [paramiko] ssh.exec_command() hangs up

2009-11-24 Thread james bardin
On Tue, Nov 24, 2009 at 6:06 AM, himanchali himanch...@inmobi.com wrote: hi.. I m using ssh =paramiko.SSHClient() object to exec_command. But I m using VPN connection to connect to hosts, so if the host disconnects, my exec_command() hangs up. There is no timeout option there i think. Even

Re: [paramiko] Fwd: Bug#556946: python-paramiko: returns None in exec_command

2009-11-23 Thread james bardin
On Mon, Nov 23, 2009 at 12:26 AM, Ritesh Raj Sarraf r...@researchut.com wrote: In my case, in the above example, it reads and then gets a 'None'. My logger, log, only accepts strings. So it fails when it receives a 'None'. Am I doing something wrong here in the way I'm reading the output

Re: [paramiko] getting stdout and stderr together

2009-11-23 Thread james bardin
On Mon, Nov 23, 2009 at 1:26 PM, Todd Whiteman to...@activestate.com wrote: Marcin Krol wrote: Hello, Is there any way to get standard output and standard error arranged chronologically together in one text stream as they come from ssh server, while doing connection_object.exec_command() of

Re: [paramiko] demo script error

2009-05-18 Thread james bardin
On Mon, May 18, 2009 at 5:26 AM, LIU YI liu_yi_b...@yahoo.com wrote: Hi All, I am a new user of paramiko. I dowloaded paramiko-1.7.4 in my Debian Voygae Linux OS recently. Python2.4 and Pycrypto2.0.1 were installed before. When I run the rforward.py which is in demo directory, an error

Re: [paramiko] Unhandled exception

2009-02-27 Thread james bardin
The funny thing is that my code seemed to complete what is was doing before the exception was thrown, so it appears to have thrown it on the way out as my script finished. I think the problem is in the thread cleanup (the paramiko transports are threaded). Did you make sure that you have

Re: [paramiko] Does Paramiko 1.7.2 and 1.6.4 work with CentOS 4

2009-02-25 Thread james bardin
On Wed, Feb 25, 2009 at 4:16 AM, Eric Noulard eric.noul...@gmail.com wrote: 2009/2/25 Shah Sultan Alam ssa...@gmail.com: 1. Does Paramiko 1.7.2 and 1.6.4 work with CentOS 4 If you can't find it in a reasonably up-to-date repository, you could just download the tarball, and run 'python