Skip to content

Commit e67cf57

Browse files
committed
ssh: Fix public key only configuration
Use the correct igconf option to inspect the variable governing whether public key only auth should be used. Ensure igconf reports an error and exits non-zero if an unsupported option is provided. Unfortunately, this won't trigger a build failure because scripts in the YAML are executed in a new process, and enforcing strict shell behaviour for the whole build is not viable.
1 parent 192a6fe commit e67cf57

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bin/igconf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]] ; then
103103
exit $?
104104
;;
105105
*)
106+
>&2 echo "Error: invalid igconf op ($op) args: $@" ; exit 1
106107
;;
107108
esac
108109
exit 1

meta/net-misc/openssh-server.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mmdebstrap:
1414
echo "$IGconf_meta_ssh_pubkey_user1" > $1/home/${IGconf_device_user1}/.ssh/authorized_keys
1515
fi
1616
- |-
17-
if igconf is_y meta_sshd_pubkey_only ; then
17+
if igconf isy meta_sshd_pubkey_only ; then
1818
mkdir -p $1/etc/ssh/sshd_config.d
1919
cat <<- 'EOCHROOT' > $1/etc/ssh/sshd_config.d/01pubkey-only.conf
2020
PermitRootLogin no

0 commit comments

Comments
 (0)