17 lines
384 B
Go
17 lines
384 B
Go
//+build !windows
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
|
|
"gitlab.com/tslocum/sshtargate/portal"
|
|
)
|
|
|
|
func listenSSH(sshAddress string, cribPath, jackAddress string, serverPath string) {
|
|
_, err := portal.New("jack", sshAddress, []string{cribPath, "--server", fmt.Sprintf("ws://%s%s", jackAddress, serverPath)})
|
|
if err != nil {
|
|
log.Fatalf("failed to start SSH server: %s", err)
|
|
}
|
|
}
|