Opens an SSH session: connects, runs the transport handshake, authenticates, and returns a session ready for SshSession.exec, SshSession.shell, or SshSession.subsystem.
Connection and authentication options.
The authenticated session.
If the connection or handshake fails.
If authentication is rejected.
If negotiation fails (e.g. no common cipher).
1.0.0
import { connect } from 'edgeport/ssh';await using ssh = await connect({ hostname: 'h', username: 'u', password: 'p' });const { stdout } = await ssh.exec('ls -la'); Copy
import { connect } from 'edgeport/ssh';await using ssh = await connect({ hostname: 'h', username: 'u', password: 'p' });const { stdout } = await ssh.exec('ls -la');
Opens an SSH session: connects, runs the transport handshake, authenticates, and returns a session ready for SshSession.exec, SshSession.shell, or SshSession.subsystem.