Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
github.com/ertanner/ssh_sftp_connection_pool
ssh sftp connection pool
This is a fork of 0xef53/go-sshpool
The documentation is located at https://godoc.org/github.com/0xef53/go-sshpool
The fork was done to open the client variable in the SSHConn struct. The change was made from "client" to "Client".
go-sshpool GoDoc
Package sshpool provides an SSH connection pool implementation for the Go language.
Installation go get github.com/0xef53/go-sshpool Example agentSocket, ok := os.LookupEnv("SSH_AUTH_SOCK") if !ok { log.Fatalln("Could not connect to SSH_AUTH_SOCK. Is ssh-agent running?") }
poolCfg := &sshpool.PoolConfig{ GCInterval: 5 * time.Second, MaxConns: 5, }
p := sshpool.NewPool(poolCfg)
sshCfg := &sshpool.SSHConfig{ User: "root", Host: "localhost", Port: 22, AgentSocket: agentSocket, Timeout: 30 * time.Second, HostKeyCallback: ssh.InsecureIgnoreHostKey(), }
output, err := p.CombinedOutput(sshCfg, "uname -a ; sleep 3", nil, nil) if err != nil { log.Fatalf("%s: %s\n", err, output) }
fmt.Println(string(output))
fmt.Println("Active connections:", p.ActiveConns()) Documentation Use Godoc documentation for reference and usage.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.