mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6730] ssh: -f functionality broken #3350
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3350
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hlein on GitHub (May 1, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6730
Description
firejail ssh -N -f -L ...will exit after successful authentication, rather than background and wait.Running without
-fworks as expected, although of course that means not backgrounding.Describe the bug
Steps to Reproduce
Throwing in some
-v's and/or verbose server logs doesn't really tell us anything new:Expected behavior
firejail ssh -N -f -L ...should connect, establish a listener, and background itself.Actual behavior
The ssh connection exits after successful authentication, rather than backgrounding itself.
Behavior without a profile
What changed calling
LC_ALL=C firejail --noprofile /path/to/programin aterminal?
The ssh connection establishes a listener, but does not exit - behaves the same as when no
-fwas specified.Additional context
No changes I experimented with in
ssh.profilechanged the behavior except for commenting outdeterministic-shutdown: once I did that, it behaves like the no--for--noprofilecases: the listener is set up, but thesshdoes not background itself.Environment
uname -srm): Linux 6.6.83-gentoo x86_64mesa 1:24.3.3-2"): openssh-10.0_p1
firejail --version): 0.9.74was compiled (
git rev-parse HEAD):Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/programOutput of
LC_ALL=C firejail --debug /path/to/program@hlein commented on GitHub (May 16, 2025):
So looking around I see some other issues that are similar / may have the same root cause, although I wouldn't necessarily say this is a dupe of them:
Firejail breaks daemonizing processes (currently open)
ControlSocket failed behaviour with ssh (closed but with a workaround of "don't use firejail", not a real fix)
ssh-agent: eval hangs without --deterministic-shutdown (currently open with a workaround of "don't background")
Also, I realized that
-fis not the only way to cause this; thessh_configsettingForkAfterAuthenticationtriggers the same behavior inssh.