[TW] SSH not creating user session

Hello,
TW - Latest Snapshot.

I just did a fresh install in a server and found that loging to the user from SSH is not creating the session nor dbus, so when trying to work with container, systemd, and loginctl appear the user is not existent.

What it must happens is:

  • When connecting through ssh to the machine, a XDG_RUNTIME or user-slice session must be started, which is not happening.

loginctl:
image
systemd:
image
podman:

Looking into what service exist:

my sshd_config:

Port 22
ListenAddress 0.0.0.0
LogLevel VERBOSE

# Strong encryption settings
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group18-sha512

# Key exchange algorithms
HostKeyAlgorithms ssh-ed25519,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com

# Authentication settings
PermitRootLogin prohibit-password
PasswordAuthentication no
ChallengeResponseAuthentication no
AuthenticationMethods publickey

# Enable only key-based login
AuthorizedKeysFile .ssh/authorized_keys

# Additional security settings
AllowTcpForwarding yes
AllowAgentForwarding no
StrictModes yes
IgnoreRhosts yes
X11Forwarding no
PermitTunnel no
MaxAuthTries 2
UseDNS no
PermitUserEnvironment no

# Client keep-alive
ClientAliveInterval 15
ClientAliveCountMax 6

# Strict HostKey settings
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

thank for the help.

Most your screenshots are unreadable. Never post text as pictures. You know how to properly do it.

Where this file is located?

Anyway, I do not see UsePAM in this file. Session is created by pam_systemd module.

The file is in /etc/ssh/sshd_config.d.

I didn’t add UsePAM, because is added in the default config, so, this config only take priority over the params I declared.

But looking into
sshd -T, found that is set not UsePam, which not have sense because, in the config I don’t touch UsePam.

Set UsePam Yes, and is working.

Thanks for the help @arvidjaar, and in the future would paste correctly the logs test.

Now the systemctl have:

❯ systemctl --user status
● devs.elrealplatano.com
State: running
Units: 113 loaded (incl. loaded aliases)
Jobs: 0 queued
Failed: 0 units
Since: Thu 2024-11-07 15:33:36 AST; 39s ago
systemd: 256.7+suse.9.gc7671762b3
Tainted: unmerged-bin < This happening.
CGroup: /user.slice/user-1000.slice/user@1000.service
└─init.scope
├─1203 /usr/lib/systemd/systemd --user
└─1271 "(sd-pam)"

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.