Skip to content

Commit

Permalink
fix(BA-459): password based SSH login not working (#3387) (#3400)
Browse files Browse the repository at this point in the history
Co-authored-by: Kyujin Cho <kyujin.cho@lablup.com>
  • Loading branch information
lablup-octodog and kyujin-cho authored Jan 8, 2025
1 parent 3c4c0ac commit bcba5e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/3387.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix password based SSH login not working on sessions based on certain images
4 changes: 2 additions & 2 deletions src/ai/backend/runner/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if [ $USER_ID -eq 0 ]; then
/opt/backend.ai/bin/python -s /opt/kernel/fantompass.py > "$HOME/.password"
export ALPHA_NUMERIC_VAL=$(cat $HOME/.password)
chmod 0644 "$HOME/.password"
echo "work:$ALPHA_NUMERIC_VAL" | chpasswd
echo "work:$ALPHA_NUMERIC_VAL" | chpasswd -c SHA512
fi

echo "Executing the main program..."
Expand Down Expand Up @@ -132,7 +132,7 @@ else
/opt/kernel/su-exec $USER_ID:$GROUP_ID /opt/backend.ai/bin/python -s /opt/kernel/fantompass.py > "$HOME/.password"
export ALPHA_NUMERIC_VAL=$(cat $HOME/.password)
chmod 0644 "$HOME/.password"
echo "$USER_NAME:$ALPHA_NUMERIC_VAL" | chpasswd
echo "$USER_NAME:$ALPHA_NUMERIC_VAL" | chpasswd -c SHA512
fi

# The gid 42 is a reserved gid for "shadow" to allow passwrd-based SSH login. (lablup/backend.ai#751)
Expand Down

0 comments on commit bcba5e4

Please sign in to comment.