SSH against the NSA

Note: Penser à croiser les sources Lien: https://stribika.github.io/2015/01/04/secure-secure-shell.html

Serveur

Dans la conf sshd_conf:
Protocol 2
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_rsa_key
PasswordAuthentication no
PubkeyAuthentication yes
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
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,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com
Changer le moduli pour 4k:

Client

# Global states
Modifier sshd_config
Modifier ssh_config
Supprimer les lignes de /etc/ssh/moduli, ou le créer

Alias:
ssh-keygen -o -a $number


#Host
# Config




cd /etc/ssh
rm ssh_host_*key*
ssh-keygen -t ed25519 -f ssh_host_ed25519_key < /dev/null
ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key < /dev/null
rm /etc/ssh/moduli
ssh-keygen -G "${HOME}/moduli" -b 4096
ssh-keygen -T /etc/ssh/moduli -f "${HOME}/moduli »
rm "${HOME}/moduli »




CLIENT SIDE
Host *
    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
    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
    PubkeyAuthentication yes
    PasswordAuthentication no
    KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256

Clé SSH sécurisées

# New format and new algorithm:
ssh-keygen -t ed25519 -o -a 100 -C "comment" -f .ssh/id_ed25519 

# Previous format and previous algorithm:
ssh-keygen -t rsa -b 4096 -C "comment" -f .ssh/id_rsa4096


Page last modified on October 18, 2015, at 10:57 PM EST