%%----------------------------------------------------------------------
\warningbox{%
Please be advised that any change in the SSH-Settings of your server might cause problems connecting to the server or starting/reloading the SSH-Daemon itself.
So every time you configure your SSH-Settings on a remote server via SSH itself, ensure that you have a second open connection to the server, which you can use to reset or adapt your changes!
}
\subsection{OpenSSH}
\subsubsection{Tested with Version} OpenSSH 6.6p1 (Gentoo)
\subsubsection{Settings}
\configfile{6.6/sshd_config}{9-14,28-29,45-45,65-67}{Important OpenSSH 6.6 security
settings}
\textbf{Note:} OpenSSH 6.6p1 now supports Curve25519
\subsubsection{Tested with Version} OpenSSH 6.5 (Debian Jessie)
\subsubsection{Settings}
\configfile{6.5/sshd_config}{9-14,28-29,45-45,65-67}{Important OpenSSH 6.4 security
settings}
\subsubsection{Tested with Version} OpenSSH 6.0p1 (Debian wheezy)
\subsubsection{Settings}
\configfile{6.0/sshd_config}{9-13,27-28,44-44,64-66}{Important OpenSSH 6.0 security
settings}
\textbf{Note:} Older |Linux| systems won't support SHA2. PuTTY (Windows) does not support
RIPE-MD160. Curve25519, AES-GCM and UMAC are only available upstream (OpenSSH
6.6p1). DSA host keys have been removed on purpose, the DSS standard does not
support for DSA keys stronger than 1024bit
\footnote{\url{https://bugzilla.mindrot.org/show_bug.cgi?id=1647}} which is far
below current standards (see section \ref{section:keylengths}). Legacy systems
can use this configuration and simply omit unsupported ciphers, key exchange
algorithms and MACs.
%\subsubsection{Justification for special settings (if needed)}
\subsubsection{References}
The OpenSSH sshd\_config man page is the best reference: \url{http://www.openssh.org/cgi-bin/man.cgi?query=sshd_config}
\subsubsection{How to test}
Connect a client with verbose logging enabled to the SSH server
\begin{lstlisting}
$ ssh -vvv myserver.com
\end{lstlisting}and observe the key exchange in the output.
%%----------------------------------------------------------------------
\subsection{Cisco ASA}
\subsubsection{Tested with Versions}
\begin{itemize*}
\item 9.1(3)
\end{itemize*}
\subsubsection{Settings}
\begin{lstlisting}
crypto key generate rsa modulus 2048
ssh version 2
ssh key-exchange group dh-group14-sha1
\end{lstlisting}
Note: When the ASA is configured for SSH, by default both SSH versions 1 and 2 are allowed. In addition to that, only a group1 DH-key-exchange is used. This should be changed to allow only SSH version 2 and to use a key-exchange with group14. The generated RSA key should be 2048 bit (the actual supported maximum). A non-cryptographic best practice is to reconfigure the lines to only allow SSH-logins.
\subsubsection{References}
\begin{itemize*}
\item \url{http://www.cisco.com/en/US/docs/security/asa/asa91/configuration/general/admin\_management.html }
\end{itemize*}
\subsubsection{How to test}
Connect a client with verbose logging enabled to the SSH server
\begin{lstlisting}
$ ssh -vvv myserver.com
\end{lstlisting}and observe the key exchange in the output.
%----------------------------------------------------------------------
\subsection{Cisco IOS}
\subsubsection{Tested with Versions}
\begin{itemize*}
\item 15.0, 15.1, 15.2
\end{itemize*}
\subsubsection{Settings}
\begin{lstlisting}
crypto key generate rsa modulus 4096 label SSH-KEYS
ip ssh rsa keypair-name SSH-KEYS
ip ssh version 2
ip ssh dh min size 2048
line vty 0 15
transport input ssh
\end{lstlisting}
Note: Same as with the ASA, also on IOS by default both SSH versions 1 and 2 are allowed and the DH-key-exchange only use a DH-group of 768 Bit.
In IOS, a dedicated Key-pair can be bound to SSH to reduce the usage of individual keys-pairs.
From IOS Version 15.0 onwards, 4096 Bit rsa keys are supported and should be used according to the paradigm "use longest supported key". Also, do not forget to disable telnet vty access.
\subsubsection{References}
\begin{itemize*}
\item \url{http://www.cisco.com/en/US/docs/ios/sec\_user\_services/configuration/guide/sec\_cfg\_secure\_shell.html}
\end{itemize*}
% add any further references or best practice documents here
\subsubsection{How to test}
Connect a client with verbose logging enabled to the SSH server
\begin{lstlisting}
$ ssh -vvv myserver.com
\end{lstlisting}and observe the key exchange in the output.