Skip to content

Commit f3f87d2

Browse files
committed
Document pseudo-TTY execCommand usage
1 parent 3a08c25 commit f3f87d2

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,20 @@ ssh.connect({
101101
})
102102
```
103103

104+
#### Pseudo-TTY commands
105+
106+
Some terminal programs, such as `screen` or `tmux`, require a pseudo-TTY. Pass
107+
`pty: true` through `execOptions` when running those commands:
108+
109+
```js
110+
const result = await ssh.execCommand('screen -r', {
111+
execOptions: { pty: true }
112+
})
113+
114+
console.log('STDOUT: ' + result.stdout)
115+
console.log('STDERR: ' + result.stderr)
116+
```
117+
104118
#### API
105119

106120
```ts

0 commit comments

Comments
 (0)