Ssh – how to know the type of symmetric encryption used by ssh

encryptionSecurityssh

I want to know the type of symmetric encryption (after authentication) used by ssh in a connection client-server. I'm not sure who determines the encryption. Client or Server?.

I have looked in /etc/ssh/ssh_config (on client) and /etc/ssh/sshd_config (on server) and nothing.

Best Answer

Both ssh_config (client configuration) and sshd_config (server configuration) have a Ciphers option that determine the supported ciphers. If the option doesn't appear in the configuration file, a built-in default applies. It is mentioned in the manual page for your version (unless your distribution tweaked the list at compile time without updated the man page). The actual cipher for a given connection is determined according to RFC 4253:

The chosen encryption algorithm to each direction MUST be the first algorithm on the client's name-list that is also on the server's name-list.

You can see what both parties had to offer and which cipher was chosen for a given connection by running ssh -vv.

Related Question