.TH ssh_server_key_api 3erl "ssh 3.0.5" "Ericsson AB" "Erlang Module Definition" .SH NAME ssh_server_key_api \- -behaviour(ssh_server_key_api). .SH DESCRIPTION .LP Behaviour describing the API for an SSH server\&'s public key handling\&. By implementing the callbacks defined in this behavior it is possible to customize the SSH server\&'s public key handling\&. By default the SSH application implements this behavior with help of the standard openssh files, see \fB ssh(7)\fR\&\&. .SH "DATA TYPES " .LP Type definitions that are used more than once in this module and/or abstractions to indicate the intended use of the data type\&. For more details on public key data types see the \fB public_key user\&'s guide\&.\fR\& .LP boolean() = true | false .LP string() = [byte()] .LP public_key() = #\&'RSAPublicKey\&'{} | {integer(), #\&'Dss-Parms\&'{}} | term() .LP private_key() = #\&'RSAPrivateKey\&'{} | #\&'DSAPrivateKey\&'{} | term() .LP public_key_algorithm() = \&'ssh-rsa\&' | \&'ssh-dss\&' | atom() .SH EXPORTS .LP .B Module:host_key(Algorithm, DaemonOptions) -> {ok, Key} | {error, Reason} .br .RS .LP Types: .RS 3 Algorithm = public_key_algorithm() .br .RS 2 Host key algorithm\&. Should support \&'ssh-rsa\&' | \&'ssh-dss\&' but additional algorithms can be handled\&. .RE DaemonOptions = proplists:proplist() .br .RS 2 Options provided to \fBssh:daemon/[2,3]\fR\& .RE Key = private_key() .br .RS 2 The private key of the host matching the \fIAlgorithm\fR\& .RE Reason = term() .br .RE .RE .RS .LP Fetches the hosts private key .RE .LP .B Module:is_auth_key(Key, User, DaemonOptions) -> Result .br .RS .LP Types: .RS 3 Key = public_key() .br .RS 2 Normally an RSA or DSA public key but handling of other public keys can be added .RE User = string() .br .RS 2 The user owning the public key .RE DaemonOptions = proplists:proplist() .br .RS 2 Options provided to \fBssh:daemon/[2,3]\fR\& .RE Result = boolean() .br .RE .RE .RS .LP Checks if the user key is authorized .RE