Expand description
SSH event handlers: authentication, channels, environment variables.
Every incoming SSH event is dispatched here by the connection loop in
serve. The main entry point is session_env, which
routes environment variable requests to handlers like pubkey_env,
wifi_ap_ssid_env and wifi_sta_ssid_env.
First-boot provisioning also flows through here: when first_login is true,
the device accepts any SSH connection (empty password) and allows the
client to set SSH_STAMP_PUBKEY. Subsequent connections require that key.
Modules§
Structs§
Enums§
- Session
Type - Uart
Param - A UART line parameter, one per
SSH_STAMP_UART_*environment variable.
Functions§
- bridge_
disable - defunct
- Returns a
BadUsageerror for unhandled events. - first_
auth - Handles the first authentication request.
- hostkeys
- Provides host keys to the SSH client.
- open_
session - Handles SSH session open requests, rejecting duplicates.
- password_
auth - Rejects password authentication requests.
- pubkey_
auth - Handles SSH public key authentication.
- pubkey_
env - Handles
SSH_STAMP_PUBKEYenvironment variable requests. - session_
env - Handles SSH environment variable requests.
- session_
exec - Rejects SSH exec requests.
- session_
pty - Handles SSH PTY requests.
- session_
shell - Handles SSH session shell requests.
- session_
subsystem - Handles SSH session subsystem requests (e.g., SFTP, CAN).
- ssh_
client - Handles an SSH client connection, bridging UART and SSH.
- uart_
env - Handles the
SSH_STAMP_UART_*environment variable requests. - wifi_
ap_ psk_ env - Handles
SSH_STAMP_WIFI_AP_PSKenvironment variable requests. - wifi_
ap_ ssid_ env - Handles
SSH_STAMP_WIFI_AP_SSIDenvironment variable requests. - wifi_
band_ env - Handles
SSH_STAMP_WIFI_BANDenvironment variable requests. - wifi_
mac_ address_ env - Handles
SSH_STAMP_WIFI_MAC_ADDRESSenvironment variable requests. - wifi_
mac_ random_ env - Handles
SSH_STAMP_WIFI_MAC_RANDOMenvironment variable requests. - wifi_
sta_ psk_ env - Handles
SSH_STAMP_WIFI_STA_PSKenvironment variable requests. - wifi_
sta_ ssid_ env - Handles
SSH_STAMP_WIFI_STA_SSIDenvironment variable requests.