Skip to content

Commit

Permalink
fix yandex-cloud#203, sshd -T cannot be executed after /etc/ssh/*_key…
Browse files Browse the repository at this point in the history
…* deletion
  • Loading branch information
dmitry-j-mikhin committed Aug 9, 2023
1 parent c1f5d63 commit a504ab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion products-prepare/linux/yc-image-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ function noOneUserHasKeyPairs {

function noPasswordAuthSSH {
V="$1"
CONF_VAULE=$(sshd -T 2>/dev/null | sed -n 's/^passwordauthentication \(.*\)/\1/p')
CONF_VAULE=$(cat /etc/ssh/sshd_config 2>/dev/null | sed -n 's/^passwordauthentication \(.*\)/\1/p')
if [ "$V" == "normal" ]; then
DETAILS=" Details: passwordauthentication ${CONF_VAULE}"
fi
Expand Down

0 comments on commit a504ab0

Please sign in to comment.