diff --git a/ssh/rootfs/etc/cont-init.d/ssh.sh b/ssh/rootfs/etc/cont-init.d/ssh.sh index 74865bff0..72f198904 100644 --- a/ssh/rootfs/etc/cont-init.d/ssh.sh +++ b/ssh/rootfs/etc/cont-init.d/ssh.sh @@ -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