Eugene Pankov 6 years ago
parent
commit
0360ad2dd0
1 changed files with 12 additions and 12 deletions
  1. 12 12
      terminus-ssh/src/api.ts

+ 12 - 12
terminus-ssh/src/api.ts

@@ -84,18 +84,6 @@ export class SSHSession extends BaseSession {
         this.scripts = connection.scripts || []
     }
 
-    private openShellChannel (options): Promise<ClientChannel> {
-        return new Promise<ClientChannel>((resolve, reject) => {
-            this.ssh.shell({ term: 'xterm-256color' }, options, (err, shell) => {
-                if (err) {
-                    reject(err)
-                } else {
-                    resolve(shell)
-                }
-            })
-        })
-    }
-
     async start () {
         this.open = true
 
@@ -334,6 +322,18 @@ export class SSHSession extends BaseSession {
         return null
     }
 
+    private openShellChannel (options): Promise<ClientChannel> {
+        return new Promise<ClientChannel>((resolve, reject) => {
+            this.ssh.shell({ term: 'xterm-256color' }, options, (err, shell) => {
+                if (err) {
+                    reject(err)
+                } else {
+                    resolve(shell)
+                }
+            })
+        })
+    }
+
     private executeUnconditionalScripts () {
         if (this.scripts) {
             for (const script of this.scripts) {