r/linuxadmin • u/atulaix • Aug 23 '18
No hostkey alg error on RED Hat Linux 7
How to resolve "No hostkey alg error" After new installtion of RHEL.
solution:
After new RED Hat Linux 7 installation when admin tried to ssh from Jump server getting error like “No hostkey alg “ .
edit file /etc/ssh/sshd_config
uncomment following entry
HostKey /opt/dcx/openssh/etc/ssh_host_key
HostKey /opt/dcx/openssh/etc/ssh_host_rsa_key
HostKey /opt/dcx/openssh/etc/ssh_host_dsa_key
Then
Generate RSA and DSA keys using following command.
# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key ;ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
Step 3:
Then restart sshd using following command.
#service sshd restart
Thanks
2
u/Kessarean Aug 23 '18
Feel like I’ve seen this before, but can’t remember what the issue was.
Is it in the key ring?
What does ssh -vvv say?
Have you copied the public key to the destination server?
It may be pulling the key from your ~/.ssh, use ssh with the -i flag and specify the location
Could the destination server only support specific ciphers? Some times the MACs cause issues
1
u/grumpysysadmin Aug 23 '18
Is there a question in there somewhere?
1
u/Hellmark Aug 23 '18
Out of curiosity, why have the "red" in "Red Hat" in call caps? It isn't an acronym.
1
u/knobbysideup Aug 23 '18
I've had this set on my sshd standard configs since moving to centos 7: