Linux "sshd" Command Line Options and Examples
OpenSSH SSH daemon

sshd (OpenSSH Daemon) is the daemon program for ssh(1). Together these programs replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. sshd listens for connections from clients.


sshd [-46DdeiqTt] [-C connection_spec] [-c host_certificate_file] [-E log_file] [-f config_file]
     [-g login_grace_time] [-h host_key_file] [-o option] [-p port] [-u len]

Command Line Options:

Forces sshd to use IPv4 addresses only.
sshd -4 ...
Forces sshd to use IPv6 addresses only.
sshd -6 ...
Specify the connection parameters to use for the -T extended test mode. If provided, any Match direc‐tives in the configuration file that would apply to the specified user, host, and address will be setbefore the configuration is written to standard output. The connection parameters are supplied as key‐word=value pairs. The keywords are “user”, “host”, “laddr”, “lport”, and “addr”. All are required andmay be supplied in any order, either with multiple -C options or as a comma-separated list.
sshd -C ...
Specifies a path to a certificate file to identify sshd during key exchange. The certificate file mustmatch a host key file specified using the -h option or the HostKey configuration directive.
sshd -c ...
Append debug logs to log_file instead of the system log.
sshd -E ...
Write debug logs to standard error instead of the system log.
sshd -e ...
Specifies the name of the configuration file. The default is /etc/ssh/sshd_config. sshd refuses tostart if there is no configuration file.
sshd -f ...
Gives the grace time for clients to authenticate themselves (default 120 seconds). If the client failsto authenticate the user within this many seconds, the server disconnects and exits. A value of zeroindicates no limit.
sshd -g ...
Specifies a file from which a host key is read. This option must be given if sshd is not run as root(as the normal host key files are normally not readable by anyone but root). The default is/etc/ssh/ssh_host_rsa_key, /etc/ssh/ssh_host_ecdsa_key and /etc/ssh/ssh_host_ed25519_key. It is possi‐ble to have multiple host key files for the different host key algorithms.
sshd -h ...
Specifies that sshd is being run from inetd(8).
sshd -i ...
Can be used to give options in the format used in the configuration file. This is useful for specifyingoptions for which there is no separate command-line flag. For full details of the options, and theirvalues, see sshd_config(5).
sshd -o ...
Specifies the port on which the server listens for connections (default 22). Multiple port options arepermitted. Ports specified in the configuration file with the Port option are ignored when a command-line port is specified. Ports specified using the ListenAddress option override command-line ports.
sshd -p ...