To prevent forwarding the SSH agent to Apptainer containers, use the --no-env flag to block the SSH_AUTH_SOCK environment variable:
--no-env
SSH_AUTH_SOCK
apptainer run --no-env SSH_AUTH_SOCK my_container.sif
If your SSH agent socket resides in /tmp (the default location) and you want to prevent any possibility of access:
/tmp
apptainer run --no-env SSH_AUTH_SOCK --no-mount tmp my_container.sif
This blocks both the environment variable and the automatic /tmp mount where the socket typically exists.
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.
Vibe can make mistakes. Check answers. Learn more