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)
| 70 | // |
| 71 | // Returns a configured SSHClient instance or an error if initialization fails. |
| 72 | func 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 | // |