Commit Graph

164 Commits

Author SHA1 Message Date
Robey Pointer 877cd974b8 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-14]
move the paramiko files into a paramiko/ folder.
just moving the files into a folder.  it won't build this way yet.
2003-12-27 01:49:19 +00:00
Robey Pointer f6e1e84d60 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-13]
fix a deadlock/race in handle_eof & close
(patch from fred gansevles)
add locking around the eof handler and the close() call, so we can't be in
both simultaneously.
2003-12-24 22:09:43 +00:00
Robey Pointer 02319afd5a [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-12]
fix dss key signing
(expanded on a patch from fred gansevles)
add a demo dss key for server mode, and fix some bugs that had caused the dss
signing stuff to never work before.  the demo_server is a bit more verbose
now, too.  both key types (RSAKey & DSSKey) now have a function to return the
fingerprint of the key, and both versions of read_private_key_file() now raise
exceptions on failure, instead of just silently setting "valid" to false.
2003-12-24 20:49:38 +00:00
Robey Pointer e7715095b6 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-11]
in server mode, don't offer keys we don't have
(from Paolo Losi) in server mode, when advertising which key methods we
support, don't list methods that we don't have any existing keys for.
2003-12-23 06:44:56 +00:00
Robey Pointer 11815d4d83 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-9]
rename secsh -> paramiko
also, rename SecshException back to SSHException.  sigh. :)
2003-11-10 08:49:50 +00:00
Robey Pointer 2ff9f46751 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-8]
doc changes
2003-11-10 06:52:35 +00:00
Robey Pointer aad7b859f1 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-7]
cleaned up server code, renamed some files & classes
renamed demo-server.py and demo-host-key to demo_server.py and
demo_host_key, just to be consistent.

renamed SSHException -> SecshException.

generalized the mechanism where Channel decides whether to allow
different channel requests: 4 of the main ones (pty, window-change,
shell, and subsystem) go through easily override-able methods now.
you could probably make an actual ssh shell server.

gave ChannelFile a repr().

turned off ultra debugging in the demos.  demo_server creates a
subclass of Channel to allow pty/shell and sets an event when the
shell request is made, so that it knows when it can start sending
the fake bbs.

renamed to charmander and updated some of the distutils files.
2003-11-10 04:54:02 +00:00
Robey Pointer 0e1ef2c65c [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-6]
notes about the exported api
just wrote some quick notes (for a few of the classes) about which
methods are intended to be the exported API.  python has no decent
way of distinguishing private vs public.
2003-11-09 21:16:35 +00:00
Robey Pointer 5a48714394 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-5]
big chunk of work which makes server code 95% done
fixed auth check methods to return just a result (failed, succeeded,
partially succeeded) and always use get_allowed_auths to determine the
list of allowed auth methods to return.

channel's internal API changed a bit to allow for client-side vs.
server-side channels.  we now honor the "want-reply" bit from channel
requests.  in server mode (for now), we automatically allow pty-req
and shell requests without doing anything.

ChannelFile was fixed up a bit to support universal newlines.  readline
got rewritten: the old way used the "greedy" read call from ChannelFile,
which won't work if the socket doesn't have that much data buffered and
ready.  now it uses recv directly, and tracks the different newlines.

demo-server.py now answers to a single shell request (like a CLI ssh
tool will make) and does a very simple demo pretending to be a BBS.

transport: fixed a bug with parsing the remote side's banner.  channel
requests are passed to another method in server mode, to determine if
we should allow it.  new allowed channels are added to an accept queue,
and a new method 'accept' (with timeout) will block until the next
incoming channel is ready.
2003-11-09 21:14:21 +00:00
Robey Pointer 79fecc4564 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-4]
change kex-gex server code to generate primes by hand
added a util function "generate_prime" to compare to the incredibly slow C
version, but it's no faster of course.  i think kex-gex from the server is
just not going to be feasible without having a separate thread generate some
primes in the background to have handy when a request comes in.  so in short,
this still doesn't work.

also i put bit_length into util and a tb_strings function which gets stack
traceback info and splits it into a list of strings.
2003-11-09 20:59:51 +00:00
Robey Pointer 7d4d90a8c5 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-3]
remove some leftover garbage from dsskey
leftover from a cut & paste i was doing a few days ago.  bad robey.
2003-11-07 10:36:42 +00:00
Robey Pointer 14d7a745a7 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-2]
add a demo host key and point demo-server at it.
also, temporarily comment out the nonfunctional kex-gex method.
2003-11-06 07:34:27 +00:00
Robey Pointer 3b9901a602 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-1]
no changes
why aren't my log messages kept?
2003-11-04 08:50:22 +00:00
Robey Pointer 51607386c7 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--base-0]
initial import

(automatically generated log message)
2003-11-04 08:34:24 +00:00