-
ping() - boolean - Writes a dummy GLOBAL_REQUEST packet (specifically "keepalive@openssh.com") that requests a reply. Returns false
if you should wait for the continue
event before sending any more traffic.
-
disconnect([< integer >reasonCode]) - boolean - Writes a disconnect packet and closes the stream. Returns false
if you should wait for the continue
event before sending any more traffic.
-
rekey() - boolean - Starts the re-keying process. Incoming/Outgoing packets are buffered until the re-keying process has finished. Returns false
to indicate that no more packets should be written until the NEWKEYS
event is seen.
-
requestSuccess([< Buffer >data]) - boolean - Writes a request success packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
requestFailure() - boolean - Writes a request failure packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
channelSuccess() - boolean - Writes a channel success packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
channelFailure() - boolean - Writes a channel failure packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
channelEOF(< integer >channel) - boolean - Writes a channel EOF packet for the given channel
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
channelClose(< integer >channel) - boolean - Writes a channel close packet for the given channel
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
channelWindowAdjust(< integer >channel, < integer >amount) - boolean - Writes a channel window adjust packet for the given channel
where amount
is the number of bytes to add to the channel window. Returns false
if you should wait for the continue
event before sending any more traffic.
-
channelData(< integer >channel, < mixed >data) - boolean - Writes a channel data packet for the given channel
where data
is a Buffer or string. Returns false
if you should wait for the continue
event before sending any more traffic.
-
channelExtData(< integer >channel, < mixed >data, < integer >type) - boolean - Writes a channel extended data packet for the given channel
where data is a _Buffer_ or _string_. Returns
falseif you should wait for the
continue` event before sending any more traffic.
-
channelOpenConfirm(< integer >remoteChannel, < integer >localChannel, < integer >initWindow, < integer >maxPacket) - boolean - Writes a channel open confirmation packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
channelOpenFail(< integer >remoteChannel, < integer >reasonCode[, < string >description]) - boolean - Writes a channel open failure packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
service(< string >serviceName) - boolean - Writes a service request packet for serviceName
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
tcpipForward(< string >bindAddr, < integer >bindPort[, < boolean >wantReply]) - boolean - Writes a tcpip forward global request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
cancelTcpipForward(< string >bindAddr, < integer >bindPort[, < boolean >wantReply]) - boolean - Writes a cancel tcpip forward global request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authPassword(< string >username, < string >password) - boolean - Writes a password userauth request packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authPK(< string >username, < object >pubKey[, < function >cbSign]) - boolean - Writes a publickey userauth request packet. pubKey
is the object returned from using utils.parseKey()
on a private or public key. If cbSign
is not present, a pubkey check userauth packet is written. Otherwise cbSign
is called with (blob, callback)
, where blob
is the data to sign with the private key and the resulting signature Buffer is passed to callback
as the first argument. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authHostbased(< string >username, < object >pubKey, < string >localHostname, < string >localUsername, < function >cbSign) - boolean - Writes a hostbased userauth request packet. pubKey
is the object returned from using utils.parseKey()
on a private or public key. cbSign
is called with (blob, callback)
, where blob
is the data to sign with the private key and the resulting signature Buffer is passed to callback
as the first argument. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authKeyboard(< string >username) - boolean - Writes a keyboard-interactive userauth request packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authNone(< string >username) - boolean - Writes a "none" userauth request packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authInfoRes(< array >responses) - boolean - Writes a userauth info response packet. responses
is an array of zero or more strings corresponding to responses to prompts previously sent by the server. Returns false
if you should wait for the continue
event before sending any more traffic.
-
directTcpip(< integer >channel, < integer >initWindow, < integer >maxPacket, < object >config) - boolean - Writes a direct tcpip channel open packet. config
must contain srcIP
, srcPort
, dstIP
, and dstPort
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
session(< integer >channel, < integer >initWindow, < integer >maxPacket) - boolean - Writes a session channel open packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
openssh_agentForward(< integer >channel[, < boolean >wantReply]) - boolean - Writes an auth-agent-req@openssh.com
channel request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
windowChange(< integer >channel, < integer >rows, < integer >cols, < integer >height, < integer >width) - boolean - Writes a window change channel request packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
pty(< integer >channel, < integer >rows, < integer >cols, < integer >height, < integer >width, < string >terminalType, < mixed >terminalModes[, < boolean >wantReply]) - boolean - Writes a pty channel request packet. If terminalType
is falsey, vt100
is used. terminalModes
can be the raw bytes, an object of the terminal modes to set, or a falsey value for no modes. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
env(< integer >channel, < string >key, < mixed >value[, < boolean >wantReply]) - boolean - Writes an env channel request packet. value
can be a string or Buffer. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
shell(< integer >channel[, < boolean >wantReply]) - boolean - Writes a shell channel request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
exec(< integer >channel, < string >command[, < boolean >wantReply]) - boolean - Writes an exec channel request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
signal(< integer >channel, < string >signalName) - boolean - Writes a signal channel request packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
x11Forward(< integer >channel, < object >config[, < boolean >wantReply]) - boolean - Writes an X11 forward channel request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic. config
can contain:
-
single - boolean - true
if only a single connection should be forwarded.
-
protocol - string - The name of the X11 authentication method used (e.g. MIT-MAGIC-COOKIE-1
).
-
cookie - string - The X11 authentication cookie encoded in hexadecimal.
-
screen - integer - The screen number to forward X11 connections for.
-
subsystem(< integer >channel, < string >name[, < boolean >wantReply]) - boolean - Writes a subsystem channel request packet. name
is the name of the subsystem (e.g. sftp
or netconf
). wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
openssh_noMoreSessions([< boolean >wantReply]) - boolean - Writes a no-more-sessions@openssh.com request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
openssh_streamLocalForward(< string >socketPath[, < boolean >wantReply]) - boolean - Writes a streamlocal-forward@openssh.com request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
openssh_cancelStreamLocalForward(< string >socketPath[, < boolean >wantReply]) - boolean - Writes a cancel-streamlocal-forward@openssh.com request packet. wantReply
defaults to true
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
openssh_directStreamLocal(< integer >channel, < integer >initWindow, < integer >maxPacket, < object >config) - boolean - Writes a direct-streamlocal@openssh.com channel open packet. config
must contain socketPath
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
serviceAccept(< string >serviceName) - boolean - Writes a service accept packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authFailure([< array >authMethods[, < boolean >partialSuccess]]) - boolean - Writes a userauth failure packet. authMethods
is an array of authentication methods that can continue. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authSuccess() - boolean - Writes a userauth success packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authPKOK(< string >keyAlgorithm, < Buffer >keyData) - boolean - Writes a userauth PK OK packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
authInfoReq(< string >name, < string >instructions, < array >prompts) - boolean - Writes a userauth info request packet. prompts
is an array of { prompt: 'Prompt text', echo: true }
objects (prompt
being the prompt text and echo
indicating whether the client's response to the prompt should be echoed to their display). Returns false
if you should wait for the continue
event before sending any more traffic.
-
forwardedTcpip(< integer >channel, < integer >initWindow, < integer >maxPacket, < object >info) - boolean - Writes a forwarded tcpip channel open packet. info
must contain boundAddr
, boundPort
, remoteAddr
, and remotePort
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
x11(< integer >channel, < integer >initWindow, < integer >maxPacket, < object >info) - boolean - Writes an X11 channel open packet. info
must contain originAddr
and originPort
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
openssh_forwardedStreamLocal(< integer >channel, < integer >initWindow, < integer >maxPacket, < object >info) - boolean - Writes an forwarded-streamlocal@openssh.com channel open packet. info
must contain socketPath
. Returns false
if you should wait for the continue
event before sending any more traffic.
-
exitStatus(< integer >channel, < integer >exitCode) - boolean - Writes an exit status channel request packet. Returns false
if you should wait for the continue
event before sending any more traffic.
-
exitSignal(< integer >channel, < string >signalName, < boolean >coreDumped, < string >errorMessage) - boolean - Writes an exit signal channel request packet. Returns false
if you should wait for the continue
event before sending any more traffic.