Skip to content

Commit

Permalink
sshd_flags: add a \ before the - to sysrc
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Jan 4, 2024
1 parent 2f46d32 commit 3080b16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions provision/host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ constrain_sshd_to_host()

tell_status "Limiting SSHd to host IP address"

sysrc sshd_flags+=" -o ListenAddress=$PUBLIC_IP4"
sysrc sshd_flags+=" \-o ListenAddress=$PUBLIC_IP4"
if [ -n "$PUBLIC_IP6" ]; then
sysrc sshd_flags+=" -o ListenAddress=$PUBLIC_IP6"
sysrc sshd_flags+=" \-o ListenAddress=$PUBLIC_IP6"
fi

service sshd configtest || exit
service sshd configtest || exit 1
service sshd restart
}

Expand Down
2 changes: 1 addition & 1 deletion test/vmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ vm_setup() {
echo 'autoboot_delay="1"' >> /boot/loader.conf

if ! grep -q PermitRootLogin /etc/rc.conf; then
sysrc sshd_flags+=" -o PermitRootLogin=without-password"
sysrc sshd_flags+=" \-o PermitRootLogin=without-password"
fi
service sshd restart

Expand Down

0 comments on commit 3080b16

Please sign in to comment.