OpenSSH ssh.conf configuration example for Ubuntu 16.04 LTS (Xenial Xerus)

Get the default configuration file ssh.conf for OpenSSH, optimized for Ubuntu 16.04 LTS (Xenial Xerus). This example configuration ensures optimal compatibility and performance for OpenSSH, making it easy to set up and adjust to meet your needs.

Find and download the configuration file here: /etc/init/ssh.conf.

For more configurations and setup guides, visit our related files section to further customize your system.

    # ssh - OpenBSD Secure Shell server
#
# The OpenSSH server provides secure shell access to the system.

description	"OpenSSH server"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5
umask 022

env SSH_SIGSTOP=1
expect stop

# 'sshd -D' leaks stderr and confuses things in conjunction with 'console log'
console none

pre-start script
    test -x /usr/sbin/sshd || { stop; exit 0; }
    test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }

    mkdir -p -m0755 /var/run/sshd
end script

# if you used to set SSHD_OPTS in /etc/default/ssh, you can change the
# 'exec' line here instead
exec /usr/sbin/sshd -D

    
  

Config Details

Location
/etc/init/ssh.conf
Operating system
Ubuntu 16.04 LTS (Xenial Xerus)
Length
29 lines
MD5 checksum
9e5ed011987e63f8035fb847170dfa3f

Usage

Download the raw file with wget or curl

Wget

wget -O ssh.conf.example https://exampleconfig.com/static/raw/openssh/ubuntu16.04/etc/init/ssh.conf

cURL

curl https://exampleconfig.com/static/raw/openssh/ubuntu16.04/etc/init/ssh.conf > ssh.conf.example