# README
ssh_client
Go ssh client configured from openssh config files
Go code example
host, err := ssh_client.New("ProxyChainHost", ssh_client.DefaultUserSettings)
if err != nil {
log.Fatalln(err)
}
conn, err := host.Dial("tcp")
if err != nil {
log.Fatalln(err)
}
defer conn.Close()
// From here we can use `conn` to Dial remote ports and/or open a session.
Corresponding ~/.ssh/config
example
Host ProxyChainHost
Hostname FinalHostname
ProxyJump %r@FirstProxy,ConfiguredProxy
Host ConfiguredProxy
Hostname intnames.dedibox.vdg.name
User root
Notes
- The keys required for all hosts must be loaded in ssh-agent before connection. (loading keys is not supported).
- Entries in
known_hosts
must be present (Adding entries is not supported).
# Functions
No description provided by the author
MultipleDefault returns the default values for the given keyword, for example// {"22"} if the keyword is "Port".
No description provided by the author
No description provided by the author
ParseSshURI parse either [user@]host[:port] or an ssh URI ie ssh://[user@]host[:port].
# Variables
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
UserSettings overrides ssh_config.UserSettings to handle MultipleDefault.