SshServerNotify¶
Server-side consumer interface. The session owns the SSH protocol: it sends every protocol reply via its own accept_/reject_ and auth_* behaviors. A consumer signals a decision by calling one of those behaviors back on the session; it never frames protocol messages itself.
Authentication and authorization DENY by default. The auth callback's default rejects unless validate_password/validate_publickey accept, and every channel authorization callback rejects unless overridden — there is no permissive default to forget. validate_password and validate_publickey have no default at all, so the compiler requires every server to state its auth policy.
The SshListener that starts sessions reports its bind outcome here too: ssh_listener_started once it is bound and accepting, ssh_listener_failed if the bind failed. Start clients only after ssh_listener_started; a connect issued before it can be refused.
Public Behaviours¶
ssh_listener_started¶
Parameters¶
- listener: DisposableActor tag
ssh_listener_failed¶
Parameters¶
- listener: DisposableActor tag
ssh_session_started¶
Parameters¶
- session: SshSession tag
ssh_session_ready¶
Parameters¶
- session: SshSession tag
ssh_channel_open_request¶
be ssh_channel_open_request(
session: SshSession tag,
channel_id: U32 val,
channel_type: String val)
Parameters¶
- session: SshSession tag
- channel_id: U32 val
- channel_type: String val
ssh_pty_request¶
be ssh_pty_request(
session: SshSession tag,
channel_id: U32 val,
pty: SshPtyState val,
want_reply: Bool val)
Parameters¶
- session: SshSession tag
- channel_id: U32 val
- pty: SshPtyState val
- want_reply: Bool val
ssh_shell_request¶
Parameters¶
- session: SshSession tag
- channel_id: U32 val
- want_reply: Bool val
ssh_channel_request¶
be ssh_channel_request(
session: SshSession tag,
channel_id: U32 val,
request_type: String val,
want_reply: Bool val)
Parameters¶
- session: SshSession tag
- channel_id: U32 val
- request_type: String val
- want_reply: Bool val
ssh_window_change¶
be ssh_window_change(
session: SshSession tag,
channel_id: U32 val,
width_chars: U32 val,
height_rows: U32 val,
width_pixels: U32 val,
height_pixels: U32 val)
Parameters¶
- session: SshSession tag
- channel_id: U32 val
- width_chars: U32 val
- height_rows: U32 val
- width_pixels: U32 val
- height_pixels: U32 val
ssh_channel_data¶
Parameters¶
- session: SshSession tag
- channel_id: U32 val
- data: Array[U8 val] val
ssh_channel_error¶
Parameters¶
- session: SshSession tag
- channel_id: U32 val
- err: SshChannelError val
ssh_channel_send_result¶
Reports one result for each channel_send call. accepted counts the prefix admitted locally. data is the original submitted array. A blocked suffix remains the caller's responsibility.
be ssh_channel_send_result(
session: SshSession tag,
channel_id: U32 val,
data: Array[U8 val] val,
accepted: USize val,
outcome: SshSendOutcome)
Parameters¶
- session: SshSession tag
- channel_id: U32 val
- data: Array[U8 val] val
- accepted: USize val
- outcome: SshSendOutcome
ssh_channel_window_available¶
The peer granted credit after a blocked send. The hint is sent once until another send blocks; it does not reserve credit for a retry.
Parameters¶
- session: SshSession tag
- channel_id: U32 val
ssh_channel_closed¶
Parameters¶
- session: SshSession tag
- channel_id: U32 val
ssh_error¶
Parameters¶
- session: SshSession tag
- err: SshTransportError val
ssh_disconnected¶
Parameters¶
- session: SshSession tag
ssh_auth_request¶
Parameters¶
- session: SshSession tag
- request: SshAuthRequest val
Public Functions¶
validate_password¶
Return true to accept this password. No default: state your policy.
Parameters¶
Returns¶
- Bool val
validate_publickey¶
Return true to accept this public key. By the time a signed request reaches here the session has already cryptographically verified possession of the private key, so this only decides authorization. Use pk.matches(...) to compare against an authorized key. No default: state your policy.
Parameters¶
- username: String val
- pk: SshAuthPublicKeyData val
Returns¶
- Bool val