Authorized Keys
~/.ssh/authorized_keys can be set up to allow remote login with a Ed25519, RSA, or ECDSA key. The authorized_keys file and its containing ~/.ssh directory must only be writable by the user, otherwise Dropbear will not allow a login using public key authentication.
Each line is of the form
[restrictions] ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIgAsp... [comment]
and can be extracted from a Dropbear private host key with ‘dropbearkey -y’. This is the same format as used by OpenSSH, though the restrictions are a subset (keys with unknown restrictions are ignored). Restrictions are comma separated, with double quotes around spaces in arguments. Available restrictions are:
no-port-forwarding-
Don't allow port forwarding for this connection, including unix streams.
no-agent-forwarding-
Don't allow agent forwarding for this connection
no-X11-forwarding-
Don't allow X11 forwarding for this connection
no-pty-
Disable PTY allocation. Note that a user can still obtain most of the same functionality with other means even if no-pty is set.
restrict-
Applies all the no- restrictions listed above.
permitopen="host:port"-
Restrict local port forwarding so that connection is allowed only to the specified host and port. Multiple permitopen options separated by commas can be set in authorized_keys. Wildcard character (‘*’) may be used in port specification for matching any port. Hosts must be literal domain names or IP addresses.
permitlisten="port"-
Restrict remote port forwarding listeners to the given port. Multiple
permitlisten="port" options separated by commas can be set in authorized_keys. Port can be 0 to allow the listen port to be dynamically allocated on the server. command="forced_command"-
Disregard the command provided by the user and always run forced_command. The
-ccommand line option overrides this. See-cdocumentation for behaviour of forced commands.When using
command=it is often desirable to also userestrictoption to avoid other SSH features that may allow additional access.