|
|
@ -18,7 +18,6 @@ import (
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"syscall"
|
|
|
|
"syscall"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/alessio/shellescape"
|
|
|
|
|
|
|
|
"github.com/peterbourgon/ff/v3/ffcli"
|
|
|
|
"github.com/peterbourgon/ff/v3/ffcli"
|
|
|
|
"inet.af/netaddr"
|
|
|
|
"inet.af/netaddr"
|
|
|
|
"tailscale.com/client/tailscale"
|
|
|
|
"tailscale.com/client/tailscale"
|
|
|
@ -81,15 +80,13 @@ func runSSH(ctx context.Context, args []string) error {
|
|
|
|
ssh,
|
|
|
|
ssh,
|
|
|
|
|
|
|
|
|
|
|
|
// Only trust SSH hosts that we know about.
|
|
|
|
// Only trust SSH hosts that we know about.
|
|
|
|
"-o", fmt.Sprintf("UserKnownHostsFile %s",
|
|
|
|
"-o", fmt.Sprintf("UserKnownHostsFile %q", knownHostsFile),
|
|
|
|
shellescape.Quote(knownHostsFile),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
"-o", "UpdateHostKeys no",
|
|
|
|
"-o", "UpdateHostKeys no",
|
|
|
|
"-o", "StrictHostKeyChecking yes",
|
|
|
|
"-o", "StrictHostKeyChecking yes",
|
|
|
|
|
|
|
|
|
|
|
|
"-o", fmt.Sprintf("ProxyCommand %s --socket=%s nc %%h %%p",
|
|
|
|
"-o", fmt.Sprintf("ProxyCommand %q --socket=%q nc %%h %%p",
|
|
|
|
shellescape.Quote(tailscaleBin),
|
|
|
|
tailscaleBin,
|
|
|
|
shellescape.Quote(rootArgs.socket),
|
|
|
|
rootArgs.socket,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
// Explicitly rebuild the user@host argument rather than
|
|
|
|
// Explicitly rebuild the user@host argument rather than
|
|
|
|