We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeouts are adhered to when connecting directly to a server. Once a proxy is introduced, the timeout seems to be ignored.
package main import ( "fmt" "os" "time" "github.com/appleboy/easyssh-proxy" "path/filepath" ) func main() { homedir, err := os.UserHomeDir() if err != nil { fmt.Printf("Error: %v\n", err) } keypath := filepath.Join(homedir, ".ssh", "id_rsa") var easySSH *easyssh.MakeConfig easySSH = &easyssh.MakeConfig{ User: "ec2-user", Server: "1.2.3.4", Port: "22", KeyPath: keypath, Timeout: 10 * time.Second, Proxy: easyssh.DefaultConfig{ User: "ec2-user", Server: "5.6.7.8", Port: "22", KeyPath: keypath, Timeout: 10 * time.Second, }, } fmt.Printf("Connecting...\n") timeStart := time.Now() stdout, stderr, isTimeout, err := easySSH.Run("ls -la", 10 * time.Second) timeEnd := time.Now() fmt.Printf("stdout: %v\n", stdout) fmt.Printf("stderr: %v\n", stderr) fmt.Printf("isTimeout: %v\n", isTimeout) fmt.Printf("err: %v\n", err) fmt.Printf("Duration: %v\n", timeEnd.Sub(timeStart)) }
(Please note the that the hostnames, usernames, and key names have been changed as they contain identifying information.)
Output:
[devops@maintenance3 proxytest]$ go build . && ./proxytest stdout: stderr: isTimeout: false err: ssh: rejected: connect failed (Connection timed out) Duration: 2m10.101925449s
I have verified connectivity to the proxy host.
Version information: github.com/appleboy/easyssh-proxy v1.5.0
The text was updated successfully, but these errors were encountered:
Also I just noticed that the connection is not seen as a timeout (isTimeout: false)
isTimeout: false
Sorry, something went wrong.
No branches or pull requests
Timeouts are adhered to when connecting directly to a server. Once a proxy is introduced, the timeout seems to be ignored.
(Please note the that the hostnames, usernames, and key names have been changed as they contain identifying information.)
Output:
I have verified connectivity to the proxy host.
Version information:
github.com/appleboy/easyssh-proxy v1.5.0
The text was updated successfully, but these errors were encountered: