on main help sign in
fix: fixed the ssh login again
commit6a5624e60813ed656c07af1328eee5fade74f415 authorrobcholz <84130577+robcholz@users.noreply.github.com> dateSat 7 Feb 2026, 20:53 (8 months ago) parenta85287d
1 file changed+3−13
src/ssh.sh+3−13
src/ssh.sh+3−13
@@ -68,15 +68,6 @@ if [ -z "$USER_HOME" ]; then
6868 USER_HOME="/home/${SSH_USER}"
6969fi
7070
71−run_as_user() {
72− runuser -u "$SSH_USER" -- env HOME="$USER_HOME" "$@"
73−}
74−
75−# Ensure user cache dirs are writable (mise writes under ~/.cache/mise)
76−install -d -m 700 -o "$SSH_USER" -g "$SSH_USER" "${USER_HOME}/.cache"
77−install -d -m 700 -o "$SSH_USER" -g "$SSH_USER" "${USER_HOME}/.cache/mise"
78−chown -R "$SSH_USER:$SSH_USER" "${USER_HOME}/.cache" 2>/dev/null || true
79−
8071# Home mount links (config-driven)
8172__VIBEBOX_HOME_LINKS__
8273
@@ -98,7 +89,7 @@ fi
9889# Install Mise
9990MISE_BIN="${USER_HOME}/.local/bin/mise"
10091if [ ! -x "$MISE_BIN" ] && ! command -v mise >/dev/null 2>&1; then
101− run_as_user sh -c 'curl https://mise.run | sh'
92+ curl https://mise.run | HOME="$USER_HOME" sh
10293fi
10394echo 'eval "$(~/.local/bin/mise activate bash)"' >> "${USER_HOME}/.bashrc"
10495
@@ -122,11 +113,10 @@ MISE
122113
123114touch "${USER_HOME}/.config/mise/mise.lock"
124115if [ -x "$MISE_BIN" ]; then
125− run_as_user "$MISE_BIN" install
116+ HOME="$USER_HOME" "$MISE_BIN" install
126117else
127− run_as_user mise install
118+ HOME="$USER_HOME" mise install
128119fi
129−chown -R "$SSH_USER:$SSH_USER" "${USER_HOME}/.cache" "${USER_HOME}/.config/mise" "${USER_HOME}/.local/share/mise" 2>/dev/null || true
130120
131121# 3) start ssh (don't swallow failures)
132122# If ssh is already active, don't force start/restart.