IsControlMasterExisting returns true if the control socket file exists.
(instDir string)
| 327 | |
| 328 | // IsControlMasterExisting returns true if the control socket file exists. |
| 329 | func IsControlMasterExisting(instDir string) bool { |
| 330 | controlSock := filepath.Join(instDir, filenames.SSHSock) |
| 331 | _, err := os.Stat(controlSock) |
| 332 | return err == nil |
| 333 | } |
| 334 | |
| 335 | // SSHOpts adds the following options to CommonOptions: User, ControlMaster, ControlPath, ControlPersist. |
| 336 | func SSHOpts(ctx context.Context, sshExe SSHExe, instDir, username string, useDotSSH, forwardAgent, forwardX11, forwardX11Trusted bool) ([]string, error) { |
no outgoing calls
no test coverage detected