Skip to content

Function: connect() ​

ts
function connect(options): Promise<ScpClient>;

Opens an SSH connection and picks the transfer protocol.

Parameters ​

ParameterType
optionsConnectOptions

Returns ​

Promise<ScpClient>

Example ​

ts
const client = await connect({ host: '10.0.0.1', username: 'root', privateKey });
await client.upload('./dist', '/www', { recursive: true });
await client.close();

Released under the MIT License.