openSSHVersion returns string representation of OpenSSH version via command "ssh -V".
()
| 19 | |
| 20 | // openSSHVersion returns string representation of OpenSSH version via command "ssh -V". |
| 21 | func openSSHVersion() (string, error) { |
| 22 | // NOTE: Somehow the version is printed to stderr. |
| 23 | _, stderr, err := process.Exec("conf.openSSHVersion", "ssh", "-V") |
| 24 | if err != nil { |
| 25 | return "", errors.Wrap(err, stderr) |
| 26 | } |
| 27 | |
| 28 | return cleanUpOpenSSHVersion(stderr), nil |
| 29 | } |
| 30 | |
| 31 | // ensureAbs prepends the WorkDir to the given path if it is not an absolute path. |
| 32 | func ensureAbs(path string) string { |
no test coverage detected