Skip to content

Commit

Permalink
update inc/sshd.inc change to sshd restart service
Browse files Browse the repository at this point in the history
change from sshd reload to restart to regenerate any missing host keys https://community.centminmod.com/posts/28297/ and also enable ecdsa key support if it's commented out
  • Loading branch information
centminmod committed Mar 10, 2016
1 parent dc7de51 commit 2ed9e86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/sshd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if [[ ! -z "$CHECKHOSTKEY" ]]; then

sed -i 's/#HostKey \/etc\/ssh\/ssh_host_rsa_key/HostKey \/etc\/ssh\/ssh_host_rsa_key/g' /etc/ssh/sshd_config
sed -i 's/#HostKey \/etc\/ssh\/ssh_host_dsa_key/HostKey \/etc\/ssh\/ssh_host_dsa_key/g' /etc/ssh/sshd_config
sed -i 's/#HostKey \/etc\/ssh\/ssh_host_ecdsa_key/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/g' /etc/ssh/sshd_config
sed -i 's/#PubkeyAuthentication/PubkeyAuthentication/g' /etc/ssh/sshd_config
sed -i 's/#RSAAuthentication/RSAAuthentication/g' /etc/ssh/sshd_config
sed -i 's/#AuthorizedKeysFile/AuthorizedKeysFile/g' /etc/ssh/sshd_config
Expand Down Expand Up @@ -56,7 +57,7 @@ if [[ ! -z "$CHECKHOSTKEY" || ! -z "$CHECKTCPALIVE" || -z "$CHECKVALUES" ]]; the
echo "Configure sshd_config"
echo "----------------------------"
/usr/sbin/sshd -t
cmservice sshd reload
cmservice sshd restart
fi

}
Expand Down

0 comments on commit 2ed9e86

Please sign in to comment.