internal/coordinator/remote: fix log message in legacyIncomingSSHPostAuth and IncomingSSHPostAuth

In the Plan 9 case, a log message is printed when ipErr != nil,
but the wrong variable err was displayed instead of ipErr.

Updates golang/go#53571

Change-Id: I4acab14f830b5cc0ae7a7863199c0b0f70af6524
Reviewed-on: https://go-review.googlesource.com/c/build/+/414595
Auto-Submit: Carlos Amedee <carlos@golang.org>
Run-TryBot: David du Colombier <0intro@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
diff --git a/internal/coordinator/remote/ssh.go b/internal/coordinator/remote/ssh.go
index 7064157..10e1405 100644
--- a/internal/coordinator/remote/ssh.go
+++ b/internal/coordinator/remote/ssh.go
@@ -313,7 +313,7 @@
 	case "plan9":
 		fmt.Fprintf(s, "# Plan9 user/pass: glenda/glenda123\n")
 		if ipErr != nil {
-			fmt.Fprintf(s, "# Failed to get IP out of %q: %v\n", rb.Buildlet().IPPort(), err)
+			fmt.Fprintf(s, "# Failed to get IP out of %q: %v\n", rb.Buildlet().IPPort(), ipErr)
 			return
 		}
 		cmd = exec.Command("/usr/local/bin/drawterm",
@@ -457,7 +457,7 @@
 	case "plan9":
 		fmt.Fprintf(s, "# Plan9 user/pass: glenda/glenda123\n")
 		if ipErr != nil {
-			fmt.Fprintf(s, "# Failed to get IP out of %q: %v\n", bc.IPPort(), err)
+			fmt.Fprintf(s, "# Failed to get IP out of %q: %v\n", bc.IPPort(), ipErr)
 			return
 		}
 		cmd = exec.Command("/usr/local/bin/drawterm",