SSH Keygen
Generate
ssh-keygen -C "" -t rsa -b BITS -f OUTPUT_FILE_KEY
-C ""
option permit to doesn't have a label.
Note: This will also make OUTPUT_FILE_KEY.pub
for public key.
Change password
ssh-keygen -f KEY_FILE -p
Print fingerkey
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key
Note: Use -E md5
to print in specific format, by default it should be sha256
For old systems which does not have -E
option
awk '{print $2}' ssh_host_rsa_key.pub | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64
List available ciphers
sshd -T | grep ciphers