Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # SOURCE: https://stribika.github.io/2015/01/04/secure-secure-shell.html
- #
- # IMPORTANT: If you aren't going to read the article (which I recommend, rather than copy/pasting) you need to execute the following command
- ## sudo usermod -a -G ssh-user <username>
- # where "<username>" is a user you want to allow to use ssh
- # /etc/ssh/sshd_config
- Host *
- KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
- PasswordAuthentication no
- ChallengeResponseAuthentication no
- PubkeyAuthentication yes
- AllowGroups ssh-user
- Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
- MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
- # /etc/ssh/ssh_config
- # Github needs diffie-hellman-group-exchange-sha1 some of the time but not always.
- #Host github.com
- # KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
- Host *
- KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
- PasswordAuthentication no
- ChallengeResponseAuthentication no
- PubkeyAuthentication yes
- HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa
- Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
- MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
- UseRoaming no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement