[security] Do not generate ssh server keys for non RSA protocols (#2718)
This commit is contained in:
parent
9d6bac567b
commit
9c83b5480d
@ -1,10 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
[ -r /etc/ssh/ssh_host_rsa_key ] || {
|
[ -r /etc/ssh/ssh_host_rsa_key ] || {
|
||||||
rm -f /etc/ssh/ssh_host_*_key*
|
rm -f /etc/ssh/ssh_host_*_key*
|
||||||
/usr/bin/ssh-keygen -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key
|
/usr/bin/ssh-keygen -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key
|
||||||
/usr/bin/ssh-keygen -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key
|
|
||||||
/usr/bin/ssh-keygen -t rsa1 -N '' -f /etc/ssh/ssh_host_key
|
|
||||||
/usr/bin/ssh-keygen -t ecdsa -N '' -f /etc/ssh/ssh_host_ecdsa_key
|
|
||||||
/usr/bin/ssh-keygen -t ed25519 -N '' -f /etc/ssh/ssh_host_ed25519_key
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user