This repository was archived by the owner on Aug 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -95,14 +95,17 @@ Starts an interactive shell session. Will resolve when then client has logged ou
9595
9696#### ` connection.forward(forwardOptions: Object) `
9797
98- Established port-forwarding.
98+ Established port-forwarding. Promise resolves after the forwarding has been established. Forwarding can be stopped by calling ` connection.shutdown() `
9999
100100Possible options for ` forwardOptions ` :
101101
102102* ` fromPort ` (required): Specifies the port on your local computer
103103* ` toPort ` (required): The port on ` endHost ` (specified in the SSHConnection options).
104104* ` toHost ` (optional): You can specify an additional ` toHost ` when you want to forward a port from a different server than your ` endHost ` .
105105
106+ #### ` connection.shutdown() `
107+
108+ Closes all connections.
106109
107110## Limitations/Todos
108111
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class SSHConnection {
4848 }
4949 }
5050
51- private async shutdown ( ) {
51+ public async shutdown ( ) {
5252 for ( const connection of this . connections ) {
5353 connection . removeAllListeners ( )
5454 connection . end ( )
You can’t perform that action at this time.
0 commit comments