Documentation
¶
Index ¶
Constants ¶
const (
DefaultPort = 22
)
Variables ¶
This section is empty.
Functions ¶
func KnownHostsPath ¶
func KnownHostsPath() string
Types ¶
type ChangedHostKeyError ¶
ChangedHostKeyError is never offered as a prompt: it is what interception looks like, and is resolved by editing known_hosts.
func (*ChangedHostKeyError) Error ¶
func (e *ChangedHostKeyError) Error() string
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a live SSH session and its filesystem. Panels share one, so it is reference counted.
type Credentials ¶
type Credentials struct {
Passphrase string
// AcceptFingerprint is the fingerprint the user confirmed after an
// UnknownHostError. Any other key is then refused.
AcceptFingerprint string
}
Credentials carries what an earlier attempt asked the user for.
type PassphraseRequiredError ¶
type PassphraseRequiredError struct {
KeyPath string
}
PassphraseRequiredError asks the UI to prompt and retry.
func (*PassphraseRequiredError) Error ¶
func (e *PassphraseRequiredError) Error() string
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry shares one connection per server, so opening the same host in the second panel is instant.
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) Acquire ¶
Acquire dials only when no connection is open. The caller must Release it.
func (*Registry) CloseAll ¶
func (r *Registry) CloseAll()
CloseAll tears down every connection at shutdown.
type SavedServer ¶
SavedServer adds the usage counters that order the list.
type Server ¶
type Server struct {
Name string `json:"name"`
Host string `json:"host"`
Port int `json:"port,omitempty"`
User string `json:"user,omitempty"`
KeyPath string `json:"key_path,omitempty"`
Dir string `json:"dir,omitempty"`
// Alias is the ~/.ssh/config name Host came from, shown in the panel
// header because it is what the user typed. Resolved at connect, not saved.
Alias string `json:"-"`
}
Server describes how to reach a host.
func (Server) DisplayName ¶
type Store ¶
type Store struct {
Servers []SavedServer `json:"servers"`
// contains filtered or unexported fields
}
Store persists the saved servers to ~/.config/mdc/servers.json. It holds no passwords: authentication is by agent or key file.
func LoadStore ¶
func LoadStore() *Store
LoadStore returns an empty store when the file does not exist yet.
func (*Store) Sorted ¶
func (s *Store) Sorted() []SavedServer
Sorted returns the most-used and most-recent first, as bookmarks are.
type UnknownHostError ¶
UnknownHostError means the user must confirm the fingerprint first.
func (*UnknownHostError) Error ¶
func (e *UnknownHostError) Error() string
Directories
¶
| Path | Synopsis |
|---|---|
|
Package testserver runs an SSH server with an SFTP subsystem in the test process, so the remote code paths need no Docker and no real host.
|
Package testserver runs an SSH server with an SFTP subsystem in the test process, so the remote code paths need no Docker and no real host. |