| 20 | ) |
| 21 | |
| 22 | type CreateServerOptions struct { |
| 23 | // Required |
| 24 | |
| 25 | // Always use `exec.CommandContext` to create the command. |
| 26 | CommandProvider func(s ssh.Session) *exec.Cmd |
| 27 | |
| 28 | // Optional |
| 29 | Host string |
| 30 | Port string |
| 31 | HostKeyPath string |
| 32 | |
| 33 | PublicKeyAuth func(ctx ssh.Context, key ssh.PublicKey) bool |
| 34 | PasswordAuth func(ctx ssh.Context, password string) bool |
| 35 | } |
| 36 | |
| 37 | func CreateServer(opts CreateServerOptions) (*ssh.Server, error) { |
| 38 | // Required options |
nothing calls this directly
no outgoing calls
no test coverage detected