summaryrefslogtreecommitdiffhomepage
path: root/demo_server.py
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2003-12-28 03:20:42 +0000
committerRobey Pointer <robey@lag.net>2003-12-28 03:20:42 +0000
commit36d6d95dc6db1f47d187b87ab1c1a10c1d30558f (patch)
tree3f7cee6177b8d4865370e902e96f9f0b7c340aa5 /demo_server.py
parenteb4c279ec4392d23c5dd7271458299fb3196f8d4 (diff)
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-16]
hook up server-side kex-gex; add more documentation group-exchange kex should work now on the server side. it will only be advertised if a "moduli" file has been loaded (see the -gasp- docs) so we don't spend hours (literally. hours.) computing primes. some of the logic was previously wrong, too, since it had never been tested. fixed repr() string for Transport/BaseTransport. moved is_authenticated to Transport where it belongs. added lots of documentation (but still only about 10% documented). lots of methods were made private finally.
Diffstat (limited to 'demo_server.py')
-rwxr-xr-xdemo_server.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/demo_server.py b/demo_server.py
index 90ab9bac..e04c8027 100755
--- a/demo_server.py
+++ b/demo_server.py
@@ -70,6 +70,11 @@ print 'Got a connection!'
try:
event = threading.Event()
t = ServerTransport(client)
+ try:
+ t.load_server_moduli()
+ except:
+ print '(Failed to load moduli -- gex will be unsupported.)'
+ raise
t.add_server_key(host_key)
t.ultra_debug = 0
t.start_server(event)
@@ -81,10 +86,11 @@ try:
# print repr(t)
# wait for auth
- chan = t.accept(10)
+ chan = t.accept(20)
if chan is None:
print '*** No channel.'
sys.exit(1)
+ print 'Authenticated!'
chan.event.wait(10)
if not chan.event.isSet():
print '*** Client never asked for a shell.'