We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7a361c7 + 90ab74a commit 77275cbCopy full SHA for 77275cb
ssh.go
@@ -231,6 +231,9 @@ func (s *SSH) createServerKey() error {
231
}
232
233
func (s *SSH) setup() error {
234
+ if s.sshconfig != nil {
235
+ return nil
236
+ }
237
config := &ssh.ServerConfig{
238
ServerVersion: fmt.Sprintf("SSH-2.0-gitkit %s", Version),
239
@@ -375,3 +378,13 @@ func (s *SSH) Address() string {
375
378
376
379
return ""
377
380
381
+
382
+// SetSSHConfig can be used to set custom SSH Server settings.
383
+func (s *SSH) SetSSHConfig(cfg *ssh.ServerConfig) {
384
+ s.sshconfig = cfg
385
+}
386
387
+// SetListener can be used to set custom Listener.
388
+func (s *SSH) SetListener(l net.Listener) {
389
+ s.listener = l
390
0 commit comments