← Computer

One SSH login, three meanings of “session”

Ubuntu packages these parts together. Each keeps track of something different.

Follow an interactive SSH login

Network

SSH client → sshd

Your laptop connects over TCP to the SSH server on the Ubuntu host.

→
Login policy

PAM

With PAM enabled, sshd calls Pluggable Authentication Modules for account checks and login setup. SSH may verify your key itself. PAM is a Unix framework, not part of systemd.

→
Login session · systemd

systemd-logind

When configured, the pam_systemd module registers the login with logind. Its record answers “who logged in, and how?”

Two other things called sessions

Process session · Linux kernel

Terminal → shell → jobs

On the terminal side of that SSH login, the shell and its jobs belong to process groups in a kernel session (SID). This Unix job-control grouping is not logind’s login record.

Application session · independent

Discussion → messages

Super uses its own session ID to group a discussion’s messages. Opening another discussion does not require another SSH login or kernel session.

Local communication, not another session

Client process

Connects to a local endpoint.
↔

Unix socket

The kernel carries data between processes on the same host. No internet connection is needed.
↔

Service process

Listens and exchanges messages.

A path like /run/example.sock can name the endpoint. It is a special filesystem entry, not a regular file storing the conversation. Some Unix sockets have no path.