Skip to content

Commit 383be0a

Browse files
committed
feat: ensure SSH service is enabled at end of install.sh to prevent connection loss after port changes
1 parent d78b4d0 commit 383be0a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,10 @@ case "${1:-}" in
224224
;;
225225
esac
226226

227+
# Run enable ssh service at the end to avoid ssh connection lost when changing ssh port if user forgets to enable ssh service after changing port
228+
# Enable ssh service also if ssh is disabled
229+
if ! systemctl is-enabled ssh >/dev/null 2>&1; then
230+
echo "Enabling SSH service..."
231+
sudo systemctl enable ssh
232+
echo "✓ SSH service enabled"
233+
fi

0 commit comments

Comments
 (0)