(forbidden bool)
| 67 | } |
| 68 | |
| 69 | func createSessionRequestCallback(forbidden bool) ssh.SessionRequestCallback { |
| 70 | return func(sess ssh.Session, requestType string) bool { |
| 71 | if forbidden { |
| 72 | log.Println("Denying shell/exec/subsystem request") |
| 73 | return false |
| 74 | } |
| 75 | return true |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | func createPasswordHandler(localPassword string) ssh.PasswordHandler { |
| 80 | return func(ctx ssh.Context, pass string) bool { |