File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,7 @@ func (svr *sshd) publicKeyHandler(ctx ssh.Context, key ssh.PublicKey) bool {
289289 // and then web terminal is connected with password?
290290 // In this case, the ssh session should be updated with the password in the context.
291291 svr .log .Tracef ("'%s' login with public key, but password is not found in the auth server" , user )
292+ valid = false // force to login with password
292293 }
293294 }
294295 return valid
@@ -394,19 +395,6 @@ func (svr *sshd) commandHandler(ss ssh.Session) {
394395 return
395396 }
396397
397- // if cmd := ss.Command(); len(cmd) > 0 && cmd[0] == "jsh" {
398- // jsCmd := "@.js"
399- // jsArgs := []string{}
400- // if len(cmd) > 1 {
401- // jsCmd = cmd[1]
402- // }
403- // if len(cmd) > 2 {
404- // jsArgs = cmd[2:]
405- // }
406- // svr.jshHandler(ss, jsCmd, jsArgs, shell.Envs)
407- // return
408- // }
409-
410398 if shellId == model .SHELLID_SHELL {
411399 shell .Envs = append (shell .Envs , fmt .Sprintf ("NEOSHELL_USER=%s" , user ))
412400 shell .Envs = append (shell .Envs , fmt .Sprintf ("NEOSHELL_PASSWORD=%s" , svr .authServer .neoShellAccount [strings .ToLower (user )]))
You can’t perform that action at this time.
0 commit comments