Commit Graph

1341 Commits

Author SHA1 Message Date
Robey Pointer 0ac7b0dcbd [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-29]
a bunch of silly changes where i was trying to fix pychecker warnings before i decided it wasnt worth the effort
2005-07-10 09:56:00 +00:00
Robey Pointer 5ba8b47a45 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-28]
forgot to import server
2005-07-09 17:31:09 +00:00
Robey Pointer fb4e56989a [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-27]
remove now-incorrect comment
2005-07-09 17:30:02 +00:00
Robey Pointer ae18228d07 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-26]
new ssh agent support!  from john rochester.  added a bunch of docs to it, and changed demo.py to use an Agent if it finds a working key there.
2005-07-07 01:35:31 +00:00
Robey Pointer e3ed1616d1 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-25]
cool optimization from john rochester: use cStringIO in Message (and also fix some unit test bugs revealed by the change)
2005-07-07 01:10:57 +00:00
Robey Pointer 0b093e49b4 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-24]
the previous windows pipe fix still didn't work.  replace it with a new pipe.py abstraction of pipes (one for posix, one for windows) which appears to finally work on windows.  for real this time.  also add some more documentation to Channel to explain that after exec_command, invoke_shell, or invoke_subsystem, a Channel can't be reused.
2005-07-07 01:03:49 +00:00
Robey Pointer de81b40e7d [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-23]
stupid little doc tweaks
2005-07-03 01:31:31 +00:00
Robey Pointer 9d27762720 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-22]
some doc changes; catch socket.error in the transport thread and log it as such instead of as an 'unknown exception'
2005-07-03 01:26:35 +00:00
Robey Pointer 401e37fa23 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-21]
oops, missed changing the version name to nidoran
2005-06-28 08:15:24 +00:00
Robey Pointer dff128c814 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-20]
fix docs and update version to 1.3.1
2005-06-28 08:00:12 +00:00
Robey Pointer ac475d4a54 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-19]
2 keys needed for unit tests
2005-06-28 07:24:10 +00:00
Robey Pointer 6ee7921d06 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-18]
tweak random stuff in transport that i forgot what it does
2005-06-28 07:23:41 +00:00
Robey Pointer 727cab9672 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-17]
more unit tests
2005-06-28 06:02:44 +00:00
Robey Pointer 1fb38470aa [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-16]
forgot this one
2005-06-28 03:47:12 +00:00
Robey Pointer 81ba7dccef [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-15]
random doc/comment tweaks
2005-06-28 03:44:25 +00:00
Robey Pointer c0b22a3aec [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-14]
cute trick i saw openssh do in a network trace: if we're not encrypting, don't waste random bytes for the padding in packetizing
2005-06-28 03:42:57 +00:00
Robey Pointer c5d2e9904a [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-13]
change pipe method to something that probably works on windows (the old system did not); also fix a race in _unlink
2005-06-28 03:42:14 +00:00
Robey Pointer 139051f815 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-12]
add notes about next version
2005-06-28 03:39:53 +00:00
Robey Pointer b1a0d8afe9 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-11]
copy over changelog from previous tla archive
2005-05-21 20:42:29 +00:00
Robey Pointer 44239ae077 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-10]
fix stupid bug in kex_group1 which luckily only affected unit tests
2005-05-21 20:35:29 +00:00
Robey Pointer cb5aa0671b [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-9]
oooh maybe i'll test things before checking them in next time: rekeying was a little bit overzealous.  now it's careful to only rekey once and reset the counters in sync
2005-05-14 06:21:36 +00:00
Robey Pointer 366f216e3f [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-8]
add unit tests for the packetizer, and fix a little locking bug where i think more of the packetizer write function should be inside a lock
2005-05-10 17:36:38 +00:00
Robey Pointer e8efe095a6 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-7]
don't close the socket until the destructor -- we may drop a session before the socket is actually finished
2005-05-04 02:44:00 +00:00
Robey Pointer 2c264c7df5 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-6]
when an auth method is rejected, log the list of acceptable auth methods
2005-05-04 02:43:14 +00:00
Robey Pointer 36055c5ac2 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-5]
split out Packetizer, fix banner detection bug, new unit test
split out a chunk of BaseTransport into a Packetizer class, which handles
the in/out packet data, ciphers, etc.  it didn't make the code any smaller
(transport.py is still close to 1500 lines, which is awful) but it did split
out a coherent chunk of functionality into a discrete unit.

in the process, fixed a bug that alain spineux pointed out: the banner
check was too forgiving and would block forever waiting for an SSH banner.
now it waits 5 seconds for the first line, and 2 seconds for each subsequent
line, before giving up.

added a unit test to test keepalive, since i wasn't sure that was still
working after pulling out Packetizer.
2005-05-01 08:04:59 +00:00
Robey Pointer 2f2d7bdee8 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-4]
add Transport.open_sftp_client
2005-04-30 19:21:43 +00:00
Robey Pointer bcf197d027 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-3]
make SFTPClient.file an alias for SFTPClient.open.
clean up docs a little, and make 'file' an alias for 'open'.
this is how python is heading in general.
2005-04-21 16:59:03 +00:00
Robey Pointer fc7ccdf834 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-1]
wacky banner
add the wacky banner to the archive.
2005-04-18 01:59:15 +00:00
Robey Pointer bd7911895b [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-164]
fix some docs
remove some epydoc comments about fileno() being non-portable.
2005-04-18 00:53:57 +00:00
Robey Pointer 89ccac6bfa [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-163]
add SFTPClient.close()
add SFTPClient.close() and add a simple little unit test for it.
2005-04-18 00:30:52 +00:00
Robey Pointer 29a5381ba1 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-162]
avoid os.environ['HOME'] in the demos
avoid using os.environ['HOME'], which will never work on windows, and
use os.path.expanduser() instead.  it's semi-moot because windows doesn't
have a standard location for ssh files, but i think paramiko should set a
good example anyway.
2005-04-18 00:11:34 +00:00
Robey Pointer 18aaff8521 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-161]
integrated laptop work (test commit)
Patches applied:

 * robey@lag.net--2003-public-master-shake/secsh--dev--1.0--base-0
   tag of robey@lag.net--2003-public/secsh--dev--1.0--patch-160

 * robey@lag.net--2003-public-master-shake/secsh--dev--1.0--patch-1
   test commit

 * robey@lag.net--2003-public/secsh--dev--1.0--base-0
   initial import

 * robey@lag.net--2003-public/secsh--dev--1.0--patch-1
   no changes
2005-04-16 23:38:22 +00:00
Robey Pointer 2bdbe28234 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-160]
1.3 marowak
bump version to 1.3 / marowak
2005-04-10 00:46:41 +00:00
Robey Pointer 7e40c6f2be [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-159]
clean up SFTPAttributes.__repr__
clean up SFTPAttributes repr() a bit.
2005-04-10 00:39:18 +00:00
Robey Pointer 6e6f1cec7a [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-158]
remove ChangeLog from MANIFEST.in
remove ChangeLog from the dist list.
2005-04-10 00:13:54 +00:00
Robey Pointer 71a337ee08 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-157]
change SubsystemHandler/SFTPServerInterface API
change the API of SubsystemHandler to accept a reference to the
ServerInstance object during construction.  this will break all code
that currently creates subsystem handlers (like sftp servers) -- sorry!

lots of little doc fixups (mostly indenting).
2005-04-06 07:24:28 +00:00
Robey Pointer 5d8d1938fa [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-156]
rewrite channel pipes to work on windows
the pipe system i was using for simulating an os-level FD (for select) was
retarded.  i realized this week that i could just use a single byte in the
pipe to signal "data is ready" and not try to feed all incoming data thru
the pipe -- and then i don't have to try to make the pipe non-blocking (which
should make it work on windows).  a lot of duplicate code got removed and now
it's all going thru the same code-path on read.

there's still a slight penalty on incoming feeds and calling 'recv' when a
pipe has been opened (by calling 'fileno'), but it's tiny.

removed a bunch of documentation and comments about things not working on
windows, since i think they probably do now.
2005-03-26 05:53:00 +00:00
Robey Pointer 3e5bd84cc5 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-155]
fix sending of large sftp packet sizes
fix a bug where packets larger than about 12KB would cause the session to
die on platforms other than osx.  turns out that on most platforms, setting a
socket timeout also causes timeouts to occur on writes (but not on osx).  so
on a huge write, once the os buffers were full, paramiko would get a
socket.timeout exception when writing, and bail.

since the timeout is primarily so we can periodically poll to see if the
session has been killed from elsewhere, do that on a timeout but otherwise
continue trying to write.  large packet sizes (in sftp) should now work.
2005-03-25 20:06:56 +00:00
Robey Pointer fead211c5c [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-154]
even better 1.2 lapras
re-bump the version # to 1.2 (with a new date since i added more stuff).
add 2005 to the copyright date in a bunch of files.
2005-02-28 08:06:08 +00:00
Robey Pointer 7490172401 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-153]
tweak sftp_file write behavior on large blocks of data
BufferedFile.write() wasn't correctly dealing with the possibility that the
underlying write might not write the entire data block at once (even though
the docs said it would).  now that it's working, make sftp_file take
advantage of it in order to chop up blocks larger than 32kB (the max allowed
on sftp) and add a unit test for it.
2005-02-28 07:49:56 +00:00
Robey Pointer 2746d44906 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-152]
little doc fixes
stupid little doc fixups that didn't fit with the other patches.
2005-02-28 07:17:21 +00:00
Robey Pointer 246f3d46a2 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-151]
fix race in transport thread startup
set active=True from the methods that start the main transport thread, right
before actually starting the thread.  this avoids a race where the main
thread could be started, but the original thread could wake up from the
event.wait(0.1) before the new thread actually set the transport active.
impossible, you say?  no machines so slow exist?  au contraire, my sad
little linux box faced this problem earlier today.
2005-02-28 07:16:22 +00:00
Robey Pointer 4b8a9d3b7a [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-150]
when combining stderr with stdout on a channel, merge the buffers too
when turning on combine-stderr mode on a channel, grab the channel lock and
feed any existing stderr buffer into the normal buffer.  this should help
applications (and my unit tests) avoid races between data coming in over
stderr and setting combine-stderr.

_send_eof is now slightly safer too, although i don't think that really fixed
anything.  it just makes me feel better.
2005-02-28 07:14:11 +00:00
Robey Pointer 8ee26cd412 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-149]
add thread ids to logs
add a logging filter that reports the thread-id of the logger, and use
that for all paramiko logging.  since thread-local stuff didn't appear
until python 2.4, i hacked up my own little version to assign incrementing
numbers to threads as they log.
2005-02-28 07:09:02 +00:00
Robey Pointer e915dccc7d [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-148]
forgot to check in stub_sftp
yikes! don't forget to check this in: needed for unit tests.
2005-02-26 21:12:43 +00:00
Robey Pointer b45a3a98a8 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-147]
1.2 (lapras)
bump version stuff to 1.2 / lapras.
2005-02-26 21:11:04 +00:00
Robey Pointer fb2d7bbddd [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-146]
raise better exception on empty key
raise a clearer exception when trying to create an empty key.
2005-02-15 15:48:47 +00:00
Robey Pointer c7d56a309d [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-145]
add methods for sending/receiving a channel's exit status
track a channel's exit status and provide a method (recv_exit_status) to
block waiting for it to arrive.  also provide a convenience method for
servers to send it (send_exit_status).  add shutdown_read and shutdown_write.
fix a bug in sending window change requests.
2005-02-15 15:47:02 +00:00
Robey Pointer f7b0a62e4b [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-144]
fix docs
clean up some of the docs.
2005-02-06 23:32:22 +00:00
Robey Pointer 0d10322783 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-143]
fix an sftp unit test
fix one of the sftp unit tests to actually work.
2005-02-06 23:30:40 +00:00