|
@@ -143,11 +143,9 @@ var sshserver = new ssh2.Server({
|
|
|
}, function(client) {
|
|
|
var userData = null;
|
|
|
client.on('authentication', function(ctx) {
|
|
|
- console.log(ctx);
|
|
|
userData = world.mud_getUserData(ctx.username);
|
|
|
switch(ctx.method) {
|
|
|
case "password":
|
|
|
- console.log("password");
|
|
|
if(world.mud_isValidLogin(userData, ctx.password)) {
|
|
|
ctx.accept();
|
|
|
} else {
|
|
@@ -155,7 +153,6 @@ var sshserver = new ssh2.Server({
|
|
|
}
|
|
|
break;
|
|
|
case "publickey":
|
|
|
- console.log(publickey);
|
|
|
var pubKeys = [];
|
|
|
var validCheck = false;
|
|
|
|
|
@@ -181,9 +178,7 @@ var sshserver = new ssh2.Server({
|
|
|
}
|
|
|
break;
|
|
|
case "none":
|
|
|
- console.log("none");
|
|
|
- ctx._stream.write("publickey\r\npassword\r\n");
|
|
|
- ctx.reject();
|
|
|
+ ctx.reject(['publickey','password','keyboard-interactive']);
|
|
|
break;
|
|
|
default:
|
|
|
ctx.reject();
|