summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-06-13 20:29:29 -0700
committerJeff Carr <[email protected]>2019-06-13 20:29:29 -0700
commit437afc794c0a311bd03e464788a5716bf568e71c (patch)
treeb5e353e36ab26683ebce23e356eea5a31c35f914
parentdb4ffc0fa9ae0d032c05f3e3ac4dc0af4a48db8f (diff)
more on windows/cygwin
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--ssh.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh.go b/ssh.go
index 7cffa79..51d7816 100644
--- a/ssh.go
+++ b/ssh.go
@@ -27,10 +27,11 @@ func SSH(hostname string, port int, username string, pass string) *ssh.Session {
keyfile := user.HomeDir + "/.ssh/id_ed25519"
if runtime.GOOS == "windows" {
- if Exists("/cygwin") {
+ if Exists("/cygdrive") {
log.Println("On Windows, but running within cygwin")
keyfile = "/home/wit/.ssh/id_ed25519"
} else {
+ log.Println("On Windows: (but not cygwin)")
keyfile = user.HomeDir + "\\id_ed25519"
}
}