On NetScaler's SSH implementation, we use a 2048 RSA Key and 1024 DSA Key for SSH.
For some security scans, the 1024 DSA Key size can cause alerts.
These would be considered negligible alerts and if the security of the SSH access is a concern, please upgrade to the latest version of 12.0 onwards and follow CTX209398
With this being said, you can change the Host Keys on NetScaler to switch the DSA key with a more secure ECDSA key.
Please note, when making changes to the SSH parameters of a NetScaler, this may cause conflicts with other devices connecting or managing NetScaler using SSH (e.g. ADM)
Please always take a backup of all modified files and test within a controlled environment before making any of these changes.
Instructions
Log onto the NetScaler, via SSH and drop into the shell.
From here, run the command "ssh-keygen -t ecdsa -b 521" to generate a Public-Private ECDSA Key Pair, using the 521 curve.
https://www.ssh.com/ssh/keygen/During the instruction steps, press Enter on each to use the defaults.
We do not want to encrypt the keys:

After doing this use the command "mv /root/.ssh/id_ecdsa* /nsconfig/ssh/" to move the newly created keys to the SSH Directory.
Then rename the keys to the correct naming convention using the mv commands, as below.
The directory should look at below:
root@NS-LAB# mv /root/.ssh/id_ecdsa* /nsconfig/ssh/
root@NS-LAB# mv /nsconfig/ssh/id_ecdsa /nsconfig/ssh/ssh_host_ecdsa_key
root@NS-LAB# mv /nsconfig/ssh/id_ecdsa.pub /nsconfig/ssh/ssh_host_ecdsa_key.pub
root@NS-LAB#
root@NS-LAB#
root@NS-LAB# ls -l /nsconfig/ssh/
total 16
-rw------- 1 root wheel 668 Jan 31 21:23 ssh_host_dsa_key
-rw-r--r-- 1 root wheel 601 Jan 31 21:23 ssh_host_dsa_key.pub
-rw------- 1 root wheel 365 Feb 1 15:22 ssh_host_ecdsa_key
-rw-r--r-- 1 root wheel 265 Feb 1 15:22 ssh_host_ecdsa_key.pub
-rw------- 1 root wheel 972 May 22 2018 ssh_host_key
-rw-r--r-- 1 root wheel 637 May 22 2018 ssh_host_key.pub
-rw------- 1 root wheel 1675 May 22 2018 ssh_host_rsa_key
-rw-r--r-- 1 root wheel 389 May 22 2018 ssh_host_rsa_key.pub
Finally, we now need to edit the SSH configuration file to stop using DSA and use the ECDSA in its place.
Make a copy of the /nsconfig/sshd_config file, by running the command "cp /nsconfig/sshd_config /nsconfig/sshd_config.bkp"
You can edit the config file, using the command "ee /nsconfig/sshd_config", then edit the below line, to point to the new key:


You can then use Esc and then follow the prompts to save the file.
Please use "cat" on the file to confirm it has been written to correctly.
After doing this, please restart the SSH process by checking the pid:
root@NS-LAB# ps -auxx | grep sshd
root 989 0.0 0.1 27312 2284 ?? Is 9:23PM 0:00.08 /usr/sbin/sshd -f /etc/sshd_config
root 96331 0.0 0.3 27312 4824 ?? Ss 3:22PM 0:00.05 sshd: nsroot@pts/0 (sshd)
root 97645 0.0 0.1 9096 1384 0 S+ 3:36PM 0:00.00 grep sshd
Then run the command "kill -HUP 989"