Skip to content

Instantly share code, notes, and snippets.

@carlbennett
Created October 19, 2015 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlbennett/8fb8545970e6df393399 to your computer and use it in GitHub Desktop.
Save carlbennett/8fb8545970e6df393399 to your computer and use it in GitHub Desktop.
Customized SSH configuration
Port 22
AddressFamily any
ListenAddress 0.0.0.0
ListenAddress ::
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
KeyRegenerationInterval 1h
ServerKeyBits 4096 # Legacy Protocol 1, meaningless on Protocol 2
SyslogFacility AUTHPRIV
LoginGraceTime 2m
PermitRootLogin yes
RSAAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication yes
AllowAgentForwarding yes
GatewayPorts no
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM yes
AllowTcpForwarding yes
X11Forwarding no
UsePrivilegeSeparation sandbox
UseDNS no
#Banner /etc/issue.net
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
AcceptEnv EDITOR PS1 VISUAL
Subsystem sftp /usr/libexec/openssh/sftp-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment