Bluestep JS Documentation
    Preparing search index...

    Class JSch

    Used to intitiate SSH and SFTP connections.

    B.io.jsch("sftp.myassn.com") .knownHosts("sftp.myassn.com ecdsa-sha2-nistp256 some-very-long-key") .username("sftpuser") .password("test") .session(session => { session.sftpClient(clientSession => { O += clientSession.ls("."); }) });

    @example   ```javascript
    B.io.jsch("something")
    .identity("privatekey")
    .name("something")
    .passphrase("password")
    .publicKey("publickey")
    .end()
    .identity("other_privatekey")
    .name("other_something")
    .passphrase("other_password")
    .publicKey("other_publickey")
    .end()
    .session(sess => {})
    Index

    Constructors

    Methods

    • Sets the remote host's port for this jsch session

      Parameters

      • port: number

      Returns JSch

    • Add an Identity to create a session with

      Parameters

      Returns JSchIdentity

    • Set the known hosts before establishing a connection. Run this command to find the value for a host, ssh-keyscan -H -t rsa MY_SSH_HOST.COM

      Parameters

      • hosts: string

      Returns JSch

    • Sets the password for this jsch session

      Parameters

      • password: string

      Returns JSch

    • Helper to retrieve the known hosts entry This is the same as the following code segment:

      return session(
      session => session.config("StrictHostKeyChecking", "no"),
      session => session.knownHostsEntry();
      });

      Returns string

    • Creates a jsch session with given username/password. Same as calling session(session => {}, afterConnect)

      Type Parameters

      • R

      Parameters

      • afterConnect: (session: JSchSession) => R

        A callback function that is called after the connection is established so that you can perform any operations.

      Returns R

    • Creates a jsch session with given username/password.

      Type Parameters

      • R

      Parameters

      • beforeConnect: (session: JSchSession) => void

        A callback function that is called before the connection is established so that you can set any additional configurations.

      • afterConnect: (session: JSchSession) => R

        A callback function that is called after the connection is established so that you can perform any operations.

      Returns R

    • Sets the Username for this jsch session

      Parameters

      • username: string

      Returns JSch