One-shot: connects, runs a command as a predicate, and closes the session.
Connect options plus the command to run.
command
true if the command exited 0, else false.
true
0
false
If the connection or handshake fails.
If authentication is rejected.
1.0.2
import { test } from 'edgeport/ssh';const ok = await test({ hostname: 'h', username: 'u', password: 'p', command: 'command -v git' }); Copy
import { test } from 'edgeport/ssh';const ok = await test({ hostname: 'h', username: 'u', password: 'p', command: 'command -v git' });
One-shot: connects, runs a command as a predicate, and closes the session.