Skip to content

Interface: SshOptions ​

Defined in: netconf/src/transport/ssh.ts:85

Options for ssh: the NETCONF server to log in to, plus how to reach it and what to open. See SSH.

Extends ​

Properties ​

agent? ​

ts
readonly agent?: string;

Defined in: netconf/src/transport/ssh.ts:44

Path of an ssh-agent socket, e.g. process.env.SSH_AUTH_SOCK.

Inherited from ​

SshEndpoint.agent


algorithms? ​

ts
readonly algorithms?: SshAlgorithms;

Defined in: netconf/src/transport/ssh.ts:66

Change the algorithm lists offered. The defaults, DEFAULT_SSH_ALGORITHMS, are ssh2's own minus every legacy algorithm (SHA-1 host keys and MACs, SHA-1 key exchange, CBC ciphers, DSA). Per category, a list replaces the default; { append, prepend, remove } edits the default; an omitted category keeps it. Whenever the result offers a legacy algorithm, each connection logs a warning naming it.

Inherited from ​

SshEndpoint.algorithms


command? ​

ts
readonly command?: string;

Defined in: netconf/src/transport/ssh.ts:89

Run this command instead of opening a subsystem (some older devices need it).


host ​

ts
readonly host: string;

Defined in: netconf/src/transport/ssh.ts:32

The host name or address to connect to.

Inherited from ​

SshEndpoint.host


hostKey ​

ts
readonly hostKey: HostKeyPolicy;

Defined in: netconf/src/transport/ssh.ts:57

Required. How to verify this server's host key: a SHA256: fingerprint, a public key line, a list of either, a verifier such as knownHostsFile(), or 'insecure-accept-any' to skip verification (logged as a warning).

Inherited from ​

SshEndpoint.hostKey


jump? ​

ts
readonly jump?: 
  | SshEndpoint
  | readonly SshEndpoint[];

Defined in: netconf/src/transport/ssh.ts:94

Reach the server through one or more jump hosts, first hop first: jump: { host: 'bastion', username, agent: process.env.SSH_AUTH_SOCK, hostKey: knownHostsFile() }.


keepaliveCountMax? ​

ts
readonly keepaliveCountMax?: number;

Defined in: netconf/src/transport/ssh.ts:70

Unanswered keepalives before the connection is considered dead. Default 3.

Inherited from ​

SshEndpoint.keepaliveCountMax


keepaliveInterval? ​

ts
readonly keepaliveInterval?: number;

Defined in: netconf/src/transport/ssh.ts:68

Milliseconds between SSH keepalives. Default 30 000; 0 disables.

Inherited from ​

SshEndpoint.keepaliveInterval


keyboardInteractive? ​

ts
readonly keyboardInteractive?: KeyboardInteractiveHandler;

Defined in: netconf/src/transport/ssh.ts:51

Answer keyboard-interactive challenges (RFC 4256), as TACACS+ and RADIUS set-ups often require. Without it, a password answers a challenge whose prompts are all hidden; a prompt that would echo is never given the password. See KeyboardInteractiveHandler.

Inherited from ​

SshEndpoint.keyboardInteractive


logger? ​

ts
readonly logger?: Logger;

Defined in: netconf/src/transport/ssh.ts:98

Where the transport logs, such as a warning about legacy algorithms. Separate from connect({ logger }).


passphrase? ​

ts
readonly passphrase?: Secret<string>;

Defined in: netconf/src/transport/ssh.ts:42

The passphrase that decrypts privateKey.

Inherited from ​

SshEndpoint.passphrase


password? ​

ts
readonly password?: Secret<string>;

Defined in: netconf/src/transport/ssh.ts:38

The password, for password authentication (and hidden keyboard-interactive prompts).

Inherited from ​

SshEndpoint.password


port? ​

ts
readonly port?: number;

Defined in: netconf/src/transport/ssh.ts:34

Default 830 for the NETCONF server, 22 for a jump host.

Inherited from ​

SshEndpoint.port


privateKey? ​

ts
readonly privateKey?: Secret<string | Buffer<ArrayBufferLike>>;

Defined in: netconf/src/transport/ssh.ts:40

A private key in OpenSSH or PEM format.

Inherited from ​

SshEndpoint.privateKey


sock? ​

ts
readonly sock?: Duplex;

Defined in: netconf/src/transport/ssh.ts:96

An already-connected socket to run SSH over, as in call home (RFC 8071). Can't be combined with jump.


subsystem? ​

ts
readonly subsystem?: string;

Defined in: netconf/src/transport/ssh.ts:87

SSH subsystem to open. Default 'netconf'.


username ​

ts
readonly username: string;

Defined in: netconf/src/transport/ssh.ts:36

The user to log in as.

Inherited from ​

SshEndpoint.username

Released under the MIT Licence.