From 3387d7c4743d46b20e35d33319c80ebb5722654a Mon Sep 17 00:00:00 2001 From: Christopher Abiad Date: Fri, 5 Apr 2013 12:24:06 -0400 Subject: [PATCH] add support for publickey-based logins --- src/sftpserver/stub_sftp.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sftpserver/stub_sftp.py b/src/sftpserver/stub_sftp.py index 7f1ecc7..e82fcd7 100644 --- a/src/sftpserver/stub_sftp.py +++ b/src/sftpserver/stub_sftp.py @@ -30,6 +30,13 @@ def check_auth_password(self, username, password): # all are allowed return AUTH_SUCCESSFUL + def check_auth_publickey(self, username, key): + # all are allowed + return AUTH_SUCCESSFUL + + def get_allowed_auths(self, username): + return 'password,publickey' + def check_channel_request(self, kind, chanid): return OPEN_SUCCEEDED