diff options
author | Robey Pointer <robey@lag.net> | 2003-11-10 08:49:50 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2003-11-10 08:49:50 +0000 |
commit | 11815d4d837314a51ebf919c1a61cb0f68a3c02b (patch) | |
tree | a87cdf5a7f3658375d0d6be642a5d8ddf46bbc36 /demo_server.py | |
parent | 2ff9f467517e1ff8916e1adbdaf342d0468b4ebb (diff) |
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-9]
rename secsh -> paramiko
also, rename SecshException back to SSHException. sigh. :)
Diffstat (limited to 'demo_server.py')
-rwxr-xr-x | demo_server.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/demo_server.py b/demo_server.py index 273bb793..0c7ec518 100755 --- a/demo_server.py +++ b/demo_server.py @@ -1,10 +1,10 @@ #!/usr/bin/python import sys, os, socket, threading, logging, traceback -import secsh +import paramiko # setup logging -l = logging.getLogger("secsh") +l = logging.getLogger("paramiko") l.setLevel(logging.DEBUG) if len(l.handlers) == 0: f = open('demo_server.log', 'w') @@ -12,11 +12,11 @@ if len(l.handlers) == 0: lh.setFormatter(logging.Formatter('%(levelname)-.3s [%(asctime)s] %(name)s: %(message)s', '%Y%m%d:%H%M%S')) l.addHandler(lh) -host_key = secsh.RSAKey() +host_key = paramiko.RSAKey() host_key.read_private_key_file('demo_host_key') -class ServerTransport(secsh.Transport): +class ServerTransport(paramiko.Transport): def check_channel_request(self, kind, chanid): if kind == 'session': return ServerChannel(chanid) @@ -27,11 +27,11 @@ class ServerTransport(secsh.Transport): return self.AUTH_SUCCESSFUL return self.AUTH_FAILED -class ServerChannel(secsh.Channel): +class ServerChannel(paramiko.Channel): "Channel descendant that pretends to understand pty and shell requests" def __init__(self, chanid): - secsh.Channel.__init__(self, chanid) + paramiko.Channel.__init__(self, chanid) self.event = threading.Event() def check_pty_request(self, term, width, height, pixelwidth, pixelheight, modes): |