Skip to content

Commit

Permalink
fixed regression on tun reverse with sshd
Browse files Browse the repository at this point in the history
  • Loading branch information
ferama committed Aug 3, 2021
1 parent 687dbb5 commit 32a46b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/tun_reverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func init() {

tunReverseCmd.Flags().BoolP("start-sshd", "S", false, "optional start the embedded sshd")
tunReverseCmd.Flags().StringP("sshd-authorized-keys", "K", "./authorized_keys", "ssh server authorized keys path")
tunReverseCmd.Flags().StringP("sshd-port", "P", "2222", "the ssh server tcp port")
tunReverseCmd.Flags().StringP("sshd-listen-address", "P", ":2222", "the ssh server tcp port")
tunReverseCmd.Flags().StringP("sshd-key", "I", "./server_key", "the ssh server key path")
}

Expand Down Expand Up @@ -67,12 +67,12 @@ var tunReverseCmd = &cobra.Command{
if startSshD {
sshdKey, _ := cmd.Flags().GetString("sshd-key")
sshdAuthorizedKeys, _ := cmd.Flags().GetString("sshd-authorized-keys")
sshdPort, _ := cmd.Flags().GetString("sshd-port")
sshdListenAddress, _ := cmd.Flags().GetString("sshd-listen-address")

config.SshD = &sshd.SshDConf{
Key: sshdKey,
AuthorizedKeysFile: sshdAuthorizedKeys,
ListenAddress: sshdPort,
ListenAddress: sshdListenAddress,
}
s := sshd.NewSshServer(config.SshD)
go s.Start()
Expand Down

0 comments on commit 32a46b3

Please sign in to comment.