Skip to content

Commit

Permalink
fix: Preserve the SSH_AUTH_SOCK environment variable when switching t…
Browse files Browse the repository at this point in the history
…o root user — fixes #367
  • Loading branch information
imgrant committed Jan 25, 2022
1 parent aeb05ca commit 677746b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssh/rootfs/etc/cont-init.d/ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if [[ "${username}" != "root" ]]; then
|| bashio::exit.nok 'Failed adding user to wheel group'

# Ensure new user switches to root after login
echo 'exec sudo -i' > "/home/${username}/.profile" \
echo 'exec sudo -i --preserve-env=SSH_AUTH_SOCK' > "/home/${username}/.profile" \
|| bashio::exit.nok 'Failed configuring user profile'
fi

Expand Down

0 comments on commit 677746b

Please sign in to comment.