summaryrefslogtreecommitdiffhomepage
path: root/demos/demo_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'demos/demo_server.py')
-rw-r--r--demos/demo_server.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/demos/demo_server.py b/demos/demo_server.py
index 7a175ac8..8a6b14f3 100644
--- a/demos/demo_server.py
+++ b/demos/demo_server.py
@@ -41,13 +41,17 @@ print("Read key: " + hexlify(host_key.get_fingerprint()).decode())
class Server(paramiko.ServerInterface):
# 'data' is the output of base64.b64encode(key)
# (using the "user_rsa_key" files)
- data = (
+ data_robey = (
b"AAAAB3NzaC1yc2EAAAABIwAAAIEAyO4it3fHlmGZWJaGrfeHOVY7RWO3P9M7hp"
b"fAu7jJ2d7eothvfeuoRFtJwhUmZDluRdFyhFY/hFAh76PJKGAusIqIQKlkJxMC"
b"KDqIexkgHAfID/6mqvmnSJf0b5W8v5h2pI/stOSwTQ+pxVhwJ9ctYDhRSlF0iT"
b"UWT10hcuO4Ks8="
)
- good_pub_key = paramiko.RSAKey(data=base64.decodebytes(data))
+ data = (
+ b"AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBDPB7gJZxOHIjoT7IEj4BQ3g7j69uRrmUTXLpnXCPqvEBcG4r/hio9OLyghMa7uTfk7j1yKdZ2bRs1SReJpdqccAAAAEc3NoOg=="
+ )
+ #good_pub_key = paramiko.RSAKey(data=base64.decodebytes(data))
+ good_pub_key = paramiko.ECDSASkKey(data=base64.decodebytes(data))
def __init__(self):
self.event = threading.Event()
@@ -64,7 +68,7 @@ class Server(paramiko.ServerInterface):
def check_auth_publickey(self, username, key):
print("Auth attempt with key: " + hexlify(key.get_fingerprint()).decode())
- if (username == "robey") and (key == self.good_pub_key):
+ if (username == "mikael") and (key == self.good_pub_key):
return paramiko.AUTH_SUCCESSFUL
return paramiko.AUTH_FAILED
@@ -112,7 +116,7 @@ class Server(paramiko.ServerInterface):
return True
-DoGSSAPIKeyExchange = True
+DoGSSAPIKeyExchange = False
# now connect
try: