From 84e29bdf51a899e8d2aeb5e0b72613736dcf6297 Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Sun, 16 Sep 2018 17:56:17 -0700 Subject: [PATCH] Fixes to authtoken/password indication at login --- hkexsh/hkexsh.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hkexsh/hkexsh.go b/hkexsh/hkexsh.go index 4427e06..a82237c 100755 --- a/hkexsh/hkexsh.go +++ b/hkexsh/hkexsh.go @@ -480,7 +480,9 @@ func main() { if aerr == nil { //authCookie = string(ab) idx := strings.Index(string(ab), remoteHost) + //fmt.Printf("auth entry idx:%d\n", idx) if idx >= 0 { + fmt.Fprintln(os.Stderr, "[authtoken]") ab = ab[idx:] entries := strings.SplitN(string(ab), "\n", -1) //if len(entries) > 0 { @@ -494,8 +496,10 @@ func main() { ab = nil runtime.GC() } else { - fmt.Fprintln(os.Stderr, "ERROR: no matching authtoken") + fmt.Fprintln(os.Stderr, "[no authtoken, use -g to request one from server]") } + } else { + log.Printf("[cannot read %s/.hkexsh_id]\n", u.HomeDir) } } @@ -503,6 +507,7 @@ func main() { // We must make the decision about interactivity before Dial() // as it affects chaffing behaviour. 20180805 if gopt { + fmt.Fprintln(os.Stderr, "[requesting authtoken from server]") op = []byte{'A'} chaffFreqMin = 2 chaffFreqMax = 10