Silence ssh-keygen output when host keys are generated. Instead, print only
key fingerprints. This replaces dozens of lines out ASCII art output with something more reasonable: armv7# service sshd start ssh-keygen: 1024 SHA256:ynP4BQ2B0Fknnf9PfF4QoUDlYi0+7rNfYXTOYP2cDic root@armv7 (DSA) ssh-keygen: 521 SHA256:Eoj382aaJNlSxuq/aYj3AXgxfMJAkyVPoCQd2BNjJiA root@armv7 (ECDSA) ssh-keygen: 256 SHA256:+e9/qTbbN/g6xvkadtHsmIQ+Pc0afZRxbXJsk2HKIzY root@armv7 (ED25519) ssh-keygen: 2048 SHA256:urNaF/m6oiCe5hXFZBxGLW2PvLz0ibtRFrqYw6R+qTw root@armv7 (RSA) ssh-keygen: 256 SHA256:Su2Nal2W3vrFz8ukpcSXngl1/bu6xUm1nSvbxTHe9Js root@armv7 (XMSS) Starting sshd.
This commit is contained in:
parent
b3cd4c7e60
commit
c9b64841e5
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: sshd,v 1.27 2018/04/09 15:02:39 christos Exp $
|
||||
# $NetBSD: sshd,v 1.28 2018/05/26 00:17:54 jmcneill Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: sshd
|
||||
|
@ -30,7 +30,8 @@ sshd_keygen()
|
|||
0) bitarg="${ssh_keygen_flags}";;
|
||||
*) bitarg="-b ${bits}";;
|
||||
esac
|
||||
"${keygen}" -t "${type}" ${bitarg} -f "${f}" -N ''
|
||||
"${keygen}" -t "${type}" ${bitarg} -f "${f}" -N '' -q && \
|
||||
printf "ssh-keygen: " && "${keygen}" -f "${f}" -l
|
||||
done << _EOF
|
||||
dsa 1024 ssh_host_dsa_key 2 DSA
|
||||
ecdsa 521 ssh_host_ecdsa_key 1 ECDSA
|
||||
|
|
Loading…
Reference in New Issue