This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
sshd_config
33 lines (33 loc) · 1.82 KB
/
sshd_config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#+BEGIN crypt_profiles ssd_config block
# https://stribika.github.io/2015/01/04/secure-secure-shell.html
Protocol 2
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_rsa_key
# XXXX: aes-gcm and aes-ctr benchmark really well on my modern machines
# XXXX: I have some old slow computers that do much better with arcfour, they should never get used unless explicitly specified or SSHing into a really old system
Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,chacha20-poly1305@openssh.com,arcfour256,arcfour128
# XXXX: last ones for compatibility, very insecure!!! For using mobile-org on android 4.4 (Jsch library)
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group1-sha1
# XXXX: last ones for compatibility, very insecure!!! For using mobile-org on android 4.4 (Jsch library)
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com,hmac-sha1
PermitRootLogin no
# TODO: don't want extra DNS activity, does this add security?
# https://unix.stackexchange.com/questions/56941/what-is-the-point-of-sshd-usedns-option
UseDNS no
# TODO: this is the default, but if set to yes could cause delays
GSSAPIAuthentication no
# Authentication:
LoginGraceTime 30
# I use TCP forwarding a lot now
AllowTcpForwarding yes
# add a group for sftp
# TOOD: not sure if these are the links I originally used
# https://www.howtoforge.com/restricting-users-to-sftp-plus-setting-up-chrooted-ssh-sftp-debian-squeeze
# https://wiki.archlinux.org/index.php/SFTP_chroot
Subsystem sftp internal-sftp
Match Group sftponly
Chrootdirectory %h
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no
#+END crypt_profiles ssd_config block