Verify SSH key file permissions
To minimize the
possibility of malicious attacks, maintain critical SSH key file permissions on
your virtual appliance host machines.
- Check the SSH public key files by running the following command:#ls -al /etc/ssh/*pub
- Verify that the files have the following permissions.-rw-r--r-- 1 root root 609date and time/etc/ssh/ssh_host_dsa_key.pub -rw-r--r-- 1 root root 181date and time/etc/ssh/ssh_host_ecdsa_key.pub -rw-r--r-- 1 root root 101date and time/etc/ssh/ssh_host_ed25519_key.pub -rw-r--r-- 1 root root 401date and time/etc/ssh/ssh_host_rsa_key.pub
- Check the SSH private key files by running the following command:ls -al /etc/ssh/*key
- Verify that the files have the following permissions.-rw------- 1 root root 668date and time/etc/ssh/ssh_host_dsa_key -rw------- 1 root root 227date and time/etc/ssh/ssh_host_ecdsa_key -rw------- 1 root root 411date and time/etc/ssh/ssh_host_ed25519_key -rw------- 1 root root 1679date and time/etc/ssh/ssh_host_rsa_key
- Check the SSH configuration files by running the following command:#lls -al /etc/ssh/*config
- Verify that the files have the following permissions.-rw-r--r-- 1 root root 1914date and time/etc/ssh/ssh_config -rw------- 1 root root 3481date and time/etc/ssh/sshd_config