class

Shirk::Server

Inherits Reference < Object

Constructors

new(host : String, port : Int32, host_key : String, username : String = "", password : String = "", kex_algorithms : String = "ml-kem-768-sha256-x25519-sha256@libssh.org:sntrup761x25519-sha512@openssh.com:curve25519-sha256@libssh.org:ecdh-sha2-nistp256:ecdh-sha2-nistp384:ecdh-sha2-nistp521:diffie-hellman-group16-sha512:diffie-hellman-group18-sha512:diffie-hellman-group14-sha256")
Source

Instance methods

auth_password_handler

Accessor for auth handler (used by callbacks)

Source
auth_pubkey_handler
Source
exec_handler
Source
host
Source
host=(host : String)
Source
host_key
Source
host_key=(host_key : String)
Source
kex_algorithms
Source
kex_algorithms=(kex_algorithms : String)
Source
on_auth_password

Set password authentication handler Block receives (user, password) and should return true to accept

Source
on_auth_pubkey

Set public key authentication handler Block receives (user, fingerprint) and should return true to accept

Source
on_exec

Set exec request handler Block receives ExecContext and should return exit code

Source
on_shell

Set shell request handler Block receives ExecContext (with empty command) and should return exit code

Source
password
Source
password=(password : String)
Source
port
Source
port=(port : Int32)
Source
run

Run the server (blocks forever, forks for each connection)

Source
shell_handler
Source
username
Source
username=(username : String)
Source