⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module ssh

Module ssh 

Source
Expand description

SSH-2.0 Server Implementation (RFC 4253, RFC 4252, RFC 4254)

Provides an SSH server for VeridianOS with:

  • SSH-2.0 binary packet protocol and version exchange
  • Key exchange via curve25519-sha256 (ECDH)
  • Password and Ed25519 public key authentication
  • Channel multiplexing with flow control (window adjust)
  • PTY allocation, shell/exec sessions, env passing
  • Session state machine from version exchange through disconnect

Structs§

AuthState
Authentication state tracking
Channel
SSH channel
ChannelRequest
Parsed channel request
ChannelTable
Channel table managing multiple channels
EnvRequest
Environment variable request
ExecRequest
Exec request: single command execution
ExitSignal
Exit signal payload (for “exit-signal” channel request)
ExitStatus
Exit status payload (for “exit-status” channel request)
HostKeyPair
Host key pair (Ed25519)
KexInitMessage
KEXINIT message (SSH_MSG_KEXINIT, type 20)
KexState
Key exchange state for curve25519-sha256
NegotiatedAlgorithms
Algorithms negotiated during key exchange
PtyInfo
PTY terminal information
ShellSession
Represents a shell/exec session on a channel
SshPacket
SSH binary packet (RFC 4253 Section 6)
SshServer
SSH server configuration and state
SshSession
SSH session (one per connected client)
TransportKeys
SSH transport encryption keys derived from key exchange
UserauthRequest
Parsed userauth request
VersionInfo
SSH version information parsed from identification string

Enums§

AlgorithmId
Supported algorithm identifiers
AuthMethod
Authentication method
AuthMethodData
Method-specific authentication data
ChannelState
Channel state
ChannelType
Channel type
SessionState
SSH server session state machine
ShellSessionState
Shell session state
SshError
SSH error types

Constants§

SSH_DEFAULT_PORT
Default SSH listen port
SSH_DISCONNECT_AUTH_CANCELLED_BY_USER
SSH_DISCONNECT_BY_APPLICATION
SSH_DISCONNECT_COMPRESSION_ERROR
SSH_DISCONNECT_CONNECTION_LOST
SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE
SSH_DISCONNECT_HOST_NOT_ALLOWED
SSH_DISCONNECT_ILLEGAL_USER_NAME
SSH_DISCONNECT_KEY_EXCHANGE_FAILED
SSH_DISCONNECT_MAC_ERROR
SSH_DISCONNECT_NO_MORE_AUTH_METHODS
SSH_DISCONNECT_PROTOCOL_ERROR
SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED
SSH_DISCONNECT_RESERVED
SSH_DISCONNECT_SERVICE_NOT_AVAILABLE
SSH_DISCONNECT_TOO_MANY_CONNECTIONS
SSH_MSG_CHANNEL_CLOSE
SSH_MSG_CHANNEL_DATA
SSH_MSG_CHANNEL_EOF
SSH_MSG_CHANNEL_EXTENDED_DATA
SSH_MSG_CHANNEL_FAILURE
SSH_MSG_CHANNEL_OPEN
SSH_MSG_CHANNEL_OPEN_CONFIRMATION
SSH_MSG_CHANNEL_OPEN_FAILURE
SSH_MSG_CHANNEL_REQUEST
SSH_MSG_CHANNEL_SUCCESS
SSH_MSG_CHANNEL_WINDOW_ADJUST
SSH_MSG_DEBUG
SSH_MSG_DISCONNECT
SSH_MSG_GLOBAL_REQUEST
SSH_MSG_IGNORE
SSH_MSG_KEXINIT
SSH_MSG_KEX_ECDH_INIT
SSH_MSG_KEX_ECDH_REPLY
SSH_MSG_NEWKEYS
SSH_MSG_REQUEST_FAILURE
SSH_MSG_REQUEST_SUCCESS
SSH_MSG_SERVICE_ACCEPT
SSH_MSG_SERVICE_REQUEST
SSH_MSG_UNIMPLEMENTED
SSH_MSG_USERAUTH_BANNER
SSH_MSG_USERAUTH_FAILURE
SSH_MSG_USERAUTH_PK_OK
SSH_MSG_USERAUTH_REQUEST
SSH_MSG_USERAUTH_SUCCESS
SSH_OPEN_ADMINISTRATIVELY_PROHIBITED
SSH_OPEN_CONNECT_FAILED
SSH_OPEN_RESOURCE_SHORTAGE
SSH_OPEN_UNKNOWN_CHANNEL_TYPE
SSH_VERSION_STRING
SSH-2.0 server identification string