more on windows/cygwin
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
db4ffc0fa9
commit
437afc794c
3
ssh.go
3
ssh.go
|
@ -27,10 +27,11 @@ func SSH(hostname string, port int, username string, pass string) *ssh.Session {
|
||||||
|
|
||||||
keyfile := user.HomeDir + "/.ssh/id_ed25519"
|
keyfile := user.HomeDir + "/.ssh/id_ed25519"
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
if Exists("/cygwin") {
|
if Exists("/cygdrive") {
|
||||||
log.Println("On Windows, but running within cygwin")
|
log.Println("On Windows, but running within cygwin")
|
||||||
keyfile = "/home/wit/.ssh/id_ed25519"
|
keyfile = "/home/wit/.ssh/id_ed25519"
|
||||||
} else {
|
} else {
|
||||||
|
log.Println("On Windows: (but not cygwin)")
|
||||||
keyfile = user.HomeDir + "\\id_ed25519"
|
keyfile = user.HomeDir + "\\id_ed25519"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue