1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-29 04:17:07 +00:00

capture_stderr to prevent stderr syslog/console output from ssh-keyscan

This commit is contained in:
Jeff Volkenant 2020-02-21 14:22:52 -08:00
parent 30c2c60f59
commit 3f5dc26be8

View File

@ -382,7 +382,7 @@ def build_sshfp_records():
except ValueError:
pass
break
keys = shell("check_output", ["ssh-keyscan", "-t", "rsa,dsa,ecdsa,ed25519", "-p", str(port), "localhost"])
keys = shell("check_output", ["ssh-keyscan", "-t", "rsa,dsa,ecdsa,ed25519", "-p", str(port), "localhost"], capture_stderr=True)
for key in sorted(keys.split("\n")):
if key.strip() == "" or key[0] == "#": continue
try: