Runs a single command over a fresh connection and returns its output.
Connection options plus the command to run.
command
The command's stdout, stderr, and exit code.
1.0.0
import { exec } from 'edgeport/ssh';const { stdout, code } = await exec({ hostname: 'h', username: 'u', password: 'p', command: 'whoami' }); Copy
import { exec } from 'edgeport/ssh';const { stdout, code } = await exec({ hostname: 'h', username: 'u', password: 'p', command: 'whoami' });
Runs a single command over a fresh connection and returns its output.