MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / NewSSHClient

Function NewSSHClient

internal/ssh/client.go:72–80  ·  view source on GitHub ↗

NewSSHClient creates a new SSHClient instance with the specified connection parameters. Authentication is handled by the underlying "ssh" command which may use SSH keys, SSH agent, or other configured authentication methods. The password parameter is currently not used but reserved for future funct

(host, user, password string, opts ...Option)

Source from the content-addressed store, hash-verified

70//
71// Returns a configured SSHClient instance or an error if initialization fails.
72func NewSSHClient(host, user, password string, opts ...Option) (*SSHClient, error) {
73 _ = password // reserved for future support; current SSH flow uses external ssh auth methods
74 client := &SSHClient{Host: host, User: user, executor: NewDefaultExecutor()}
75 for _, opt := range opts {
76 opt(client)
77 }
78
79 return client, nil
80}
81
82// Shell opens an interactive SSH shell session on the configured host.
83//

Callers 1

Calls 1

NewDefaultExecutorFunction · 0.85

Tested by 1