Bug#1021613: systemd: generates too much log for ssh connection

Michael Biebl biebl at debian.org
Wed Oct 12 10:39:40 BST 2022


On Tue, 11 Oct 2022 22:02:31 +0200 Vincent Lefevre <vincent at vinc17.net> 
wrote:
> Package: systemd
> Version: 247.3-7+deb11u1
> Severity: minor
> 
> Each time I do a Subversion connection via ssh, I get 24 lines of logs
> from systemd (in addition to a few ones from sshd), e.g.
> 
> Oct 11 20:36:27 joooj systemd-logind[579]: New session 379 of user svn.
> Oct 11 20:36:27 joooj systemd[1]: Created slice User Slice of UID 1001.
> Oct 11 20:36:27 joooj systemd[1]: Starting User Runtime Directory /run/user/1001...
> Oct 11 20:36:27 joooj systemd[1]: Finished User Runtime Directory /run/user/1001.
> Oct 11 20:36:27 joooj systemd[1]: Starting User Manager for UID 1001...
> Oct 11 20:36:27 joooj systemd[26819]: pam_unix(systemd-user:session): session opened for user svn(uid=1001) by (uid=0)
> Oct 11 20:36:27 joooj systemd[26819]: Queued start job for default target Main User Target.
> Oct 11 20:36:27 joooj systemd[26819]: Created slice User Application Slice.
> Oct 11 20:36:27 joooj systemd[26819]: Reached target Paths.
> Oct 11 20:36:27 joooj systemd[26819]: Reached target Timers.
> Oct 11 20:36:27 joooj systemd[26819]: Listening on GnuPG network certificate management daemon.
> Oct 11 20:36:27 joooj systemd[26819]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
> Oct 11 20:36:27 joooj systemd[26819]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
> Oct 11 20:36:27 joooj systemd[26819]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
> Oct 11 20:36:27 joooj systemd[26819]: Listening on GnuPG cryptographic agent and passphrase cache.
> Oct 11 20:36:27 joooj systemd[26819]: Reached target Sockets.
> Oct 11 20:36:27 joooj systemd[26819]: Reached target Basic System.
> Oct 11 20:36:27 joooj systemd[1]: Started User Manager for UID 1001.
> Oct 11 20:36:27 joooj systemd[1]: Started Session 379 of user svn.
> Oct 11 20:36:27 joooj systemd[26819]: Reached target Main User Target.
> Oct 11 20:36:27 joooj systemd[26819]: Startup finished in 95ms.
> Oct 11 20:36:28 joooj systemd-logind[579]: Session 379 logged out. Waiting for processes to exit.
> Oct 11 20:36:28 joooj systemd[1]: session-379.scope: Succeeded.
> Oct 11 20:36:28 joooj systemd-logind[579]: Removed session 379.

What you see here is expected behaviour:
Your login via SSH is apparently done via PAM, which triggers the start 
of a systemd --user instance (with all that it entails). And systemd 
dutifully logs everything when setting up that user instance (and 
tearing it down again on log out).

If you generate lots of SSH logins via subversion, then this will 
generate lots of log messages.
Maybe there is a way to use a more restricted environment/login shell 
for subversion access which doesn't trigger PAM.

If you don't want to constantly start/stop the user instance, you can 
also use linger, so the user instance will stick around if you terminate 
your SSH session.



Not sure if there is much we can do about this in the Debian downstream 
bug tracker.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20221012/adbbef1f/attachment-0001.sig>


More information about the Pkg-systemd-maintainers mailing list