Description
Goph is a lightweight SSH client library for Go. It lets a Go program run commands over an SSH connection, and it describes itself as focused on simplicity. The README lists support for connections with passwords, private keys, protected private keys that need a passphrase, raw private key bytes, and an SSH agent, and it says several authentication methods can be tried in one connection. Known hosts are checked by default, and the library can also add new hosts to the known_hosts file or use a custom host key callback. For files, it can upload and download between local and remote machines, and it offers SFTP operations such as open, create and chmod. Commands can take a context.Context, so a run can be cancelled or given a timeout. The library also supports connecting through a SOCKS5 proxy and through a jump host, and it can stream a script from an io.Reader. The README says the Go documentation has the full API reference, and the repository is public on GitHub.…
Highlights
- Run commands over SSH from Go
- Password, key and SSH agent authentication
- Upload and download with SFTP operations
- SOCKS5 proxy and jump host support
Ratings & Reviews
No ratings yet
Be the first to rate Goph.
People also visit
Goph FAQ
What is Goph?
A lightweight SSH client library for Go that lets your program run commands on remote machines, upload and download files, and open SFTP operations.
How do I run a command on a remote host?
The README says a simple example is enough to run a command over SSH. The full API is in the Go documentation.
Which ways of logging in does it support?
Passwords, private keys including protected keys with a passphrase, raw key bytes, the SSH agent, keyboard-interactive prompts and custom signers.
Does it check host keys?
Yes. Known hosts verification is on by default. The README also shows how to disable it, and warns that doing so is insecure.
Can it connect through a bastion or proxy?
Yes. The README lists connections through a SOCKS5 proxy, through a jump host, and both together.
Is it free?
The listing shows it as free, and the source is public on GitHub.
What are the best Goph alternatives?
Popular alternatives to Goph include Sshj, Gost and goploader. See all Goph alternatives