fix: run SSH fix from /tmp to bypass broken home dir
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3e3dfafdfc
commit
712e1c8b25
@ -4,20 +4,20 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
env:
|
||||||
|
HOME: /tmp
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fix-ssh:
|
fix-ssh:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Fix debian user UID and SSH
|
- name: Fix debian user UID and SSH
|
||||||
|
working-directory: /tmp
|
||||||
run: |
|
run: |
|
||||||
echo "Current debian UID: $(id -u debian)"
|
echo "Fixing SSH..."
|
||||||
echo "Fixing ownership with numeric UIDs..."
|
sudo chown -R 1000:1000 /home/debian
|
||||||
DEBIAN_UID=$(id -u debian)
|
|
||||||
DEBIAN_GID=$(id -g debian)
|
|
||||||
sudo chown -R ${DEBIAN_UID}:${DEBIAN_GID} /home/debian
|
|
||||||
sudo chmod 700 /home/debian/.ssh
|
sudo chmod 700 /home/debian/.ssh
|
||||||
sudo chmod 600 /home/debian/.ssh/authorized_keys
|
sudo chmod 600 /home/debian/.ssh/authorized_keys
|
||||||
ls -la /home/debian/.ssh/
|
|
||||||
sudo systemctl restart sshd
|
sudo systemctl restart sshd
|
||||||
echo "SSH fixed — debian is UID ${DEBIAN_UID}"
|
echo "SSH fixed"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user