MCPcopy Create free account
hub / github.com/Driver-C/tryssh / tryLoginWithCache

Method tryLoginWithCache

pkg/control/ssh.go:40–47  ·  view source on GitHub ↗
(user string, targetServer *config.ServerListConfig)

Source from the content-addressed store, hash-verified

38}
39
40func (sc *SSHController) tryLoginWithCache(user string, targetServer *config.ServerListConfig) {
41 lan := &launcher.SSHLauncher{SSHConnector: *launcher.GetSSHConnectorFromConfig(targetServer)}
42 lan.SSHTimeout = sshClientTimeoutWhenLogin
43 if !lan.Launch() {
44 utils.Errorf("Failed to log in with cached information. Start trying to login again.\n\n")
45 sc.tryLoginWithoutCache(user)
46 }
47}
48
49func (sc *SSHController) tryLoginWithoutCache(user string) {
50 combinations := config.GenerateCombination(sc.targetIP, user, sc.configuration)

Callers 1

TryLoginMethod · 0.95

Calls 4

LaunchMethod · 0.95
tryLoginWithoutCacheMethod · 0.95
ErrorfFunction · 0.92

Tested by

no test coverage detected