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