mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-11 16:18:41 +00:00

use C:\Windows\System32\OpenSSH\ssh.exe (#4933) Change-Id: Iad73b27b23b746de2c7e994572a54e7e1c370588 Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> (cherry picked from commit 1d04e01d1e62e0f83a24c0e2963c1b74db33c00d)
27 lines
514 B
Go
27 lines
514 B
Go
// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build !js && !windows
|
|
// +build !js,!windows
|
|
|
|
package cli
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
func findSSH() (string, error) {
|
|
return exec.LookPath("ssh")
|
|
}
|
|
|
|
func execSSH(ssh string, argv []string) error {
|
|
if err := syscall.Exec(ssh, argv, os.Environ()); err != nil {
|
|
return err
|
|
}
|
|
return errors.New("unreachable")
|
|
}
|