Interface: Scp2Options
Connection options in the scp2 style: node-scp's connect options plus a remote path.
Extends
Omit<ConnectOptions,"port"|"beforeConnect"|"signal">
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
agent? | | string | BaseAgent<string | Buffer<ArrayBufferLike> | ParsedKey> | Path to ssh-agent's UNIX socket for ssh-agent-based user authentication (or 'pageant' when using Pagent on Windows). | ConnectOptions.agent |
agentForward? | boolean | Set to true to use OpenSSH agent forwarding (auth-agent@openssh.com) for the life of the connection. | ConnectOptions.agentForward |
algorithms? | Algorithms | Explicit overrides for the default transport layer algorithms used for the connection. | ConnectOptions.algorithms |
authHandler? | AuthenticationType[] | AuthHandlerMiddleware | AuthMethod[] | Function with parameters (methodsLeft, partialSuccess, callback) where methodsLeft and partialSuccess are null on the first authentication attempt, otherwise are an array and boolean respectively. Return or call callback() with the name of the authentication method to try next (pass false to signal no more methods to try). Valid method names are: 'none', 'password', 'publickey', 'agent', 'keyboard-interactive', 'hostbased'. Default: function that follows a set method order: None -> Password -> Private Key -> Agent (-> keyboard-interactive if tryKeyboard is true) -> Hostbased. | ConnectOptions.authHandler |
debug? | DebugFunction | A function that receives a single string argument to get detailed (local) debug information. | ConnectOptions.debug |
forceIPv4? | boolean | Only connect via resolved IPv4 address for host. | ConnectOptions.forceIPv4 |
forceIPv6? | boolean | Only connect via resolved IPv6 address for host. | ConnectOptions.forceIPv6 |
host? | string | Hostname or IP address of the server. | ConnectOptions.host |
hostHash? | string | The host's key is hashed using this method and passed to hostVerifier. | ConnectOptions.hostHash |
hostVerifier? | | HostVerifier | SyncHostVerifier | HostFingerprintVerifier | SyncHostFingerprintVerifier | Verifies a hexadecimal hash of the host's key. | ConnectOptions.hostVerifier |
ident? | string | Buffer<ArrayBufferLike> | A custom server software name/version identifier. Default: 'ssh2js' + moduleVersion + 'srv' | ConnectOptions.ident |
keepaliveCountMax? | number | How many consecutive, unanswered SSH-level keepalive packets that can be sent to the server before disconnection. | ConnectOptions.keepaliveCountMax |
keepaliveInterval? | number | How often (in milliseconds) to send SSH-level keepalive packets to the server. Set to 0 to disable. | ConnectOptions.keepaliveInterval |
localAddress? | string | IP address of the network interface to use to connect to the server. Default: (none -- determined by OS) | ConnectOptions.localAddress |
localHostname? | string | Along with localUsername and privateKey, set this to a non-empty string for hostbased user authentication. | ConnectOptions.localHostname |
localPort? | number | The local port number to connect from. Default: (none -- determined by OS) | ConnectOptions.localPort |
localUsername? | string | Along with localHostname and privateKey, set this to a non-empty string for hostbased user authentication. | ConnectOptions.localUsername |
noDelay? | boolean | Disables Nagle's algorithm on the TCP socket. SCP and SFTP wait for a reply after small messages, so leaving Nagle on makes many small files up to 25 times slower. Defaults to true. | ConnectOptions.noDelay |
passphrase? | string | Buffer<ArrayBufferLike> | For an encrypted private key, this is the passphrase used to decrypt it. | ConnectOptions.passphrase |
password? | string | Password for password-based user authentication. | ConnectOptions.password |
path? | string | Remote path the operation works on. | - |
port? | string | number | SSH port, as a number or a string. | - |
privateKey? | string | Buffer<ArrayBufferLike> | Buffer or string that contains a private key for either key-based or hostbased user authentication (OpenSSH format). | ConnectOptions.privateKey |
protocol? | Protocol | Transfer protocol. Defaults to auto. | ConnectOptions.protocol |
readyTimeout? | number | * How long (in milliseconds) to wait for the SSH handshake to complete. | ConnectOptions.readyTimeout |
remoteOs? | RemoteOs | Path flavour and shell quoting rules of the remote host. Defaults to posix. | ConnectOptions.remoteOs |
scpCommand? | string | Remote command used for SCP transfers. Defaults to scp. | ConnectOptions.scpCommand |
sock? | Readable | A ReadableStream to use for communicating with the server instead of creating and using a new TCP connection (useful for connection hopping). | ConnectOptions.sock |
strictVendor? | boolean | Performs a strict server vendor check before sending vendor-specific requests. | ConnectOptions.strictVendor |
timeout? | number | The underlying socket timeout in ms. Default: none) | ConnectOptions.timeout |
tryKeyboard? | boolean | Try keyboard-interactive user authentication if primary user authentication method fails. | ConnectOptions.tryKeyboard |
username? | string | Username for authentication. | ConnectOptions.username |