Skip to content

Commit 2831224

Browse files
committed
use right log file
1 parent 3dce526 commit 2831224

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/job_ssh.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ func (m ModJobSshStruct) setupClusterInner(clusterConf clusterconf.ClusterConfYm
336336
}
337337
_ = base64.StdEncoding.EncodeToString(pubkeybytes)
338338

339-
output, _ := util.StartRemoteCmds(
339+
output, logfps := util.StartRemoteCmds(
340340
hosts,
341341

342342
util.ModRunCmd.CmdModels().InstallTelegoWithPy()+" && "+
@@ -357,7 +357,8 @@ func (m ModJobSshStruct) setupClusterInner(clusterConf clusterconf.ClusterConfYm
357357
})
358358
}) {
359359
fmt.Println(color.RedString("ssh setup remote pubkey error: %v", output))
360-
fmt.Println(color.RedString("recent remote log: %v", util.GetMostRecentRemoteLog()))
360+
logf, _ := os.ReadFile(logfps[0])
361+
fmt.Println(color.RedString("∂∂remote log: %v", string(logf)))
361362
os.Exit(1)
362363
// // debug sshd_config
363364
// util.ModRunCmd.NewBuilder("cat", "/etc/ssh/sshd_config").WithRoot().ShowProgress().BlockRun()

0 commit comments

Comments
 (0)