SSH is broken in new installation

Hello everyone,

I just installed a fresh EndeavourOS Gnome flavor, preserving /home from the previous installation. I then noticed that git was not authenticating using my ssh key. I searched and I found that I need to enable gcr-ssh-agent.socket as per this arch wiki guide. I still did not work though. All ssh commands (ssh, ssh-agent, ssh-add, etc) return 0 immediately without printing anything. Does anyone know what could cause this?

systemctl status --user gcr-ssh-agent.socket
● gcr-ssh-agent.socket - GCR ssh-agent wrapper
Loaded: loaded (/usr/lib/systemd/user/gcr-ssh-agent.socket; enabled; preset: enabled)
Active: active (running) since Mon 2024-07-01 19:41:42 CEST; 14h ago
Invocation: af64c8c7aa67430c952516a2cad2758c
Triggers: ● gcr-ssh-agent.service
Listen: /run/user/1000/gcr/ssh (Stream)
Process: 1386 ExecStartPost=/usr/bin/systemctl --user set-environment SSH_AUTH_SOCK=/run/user/1000/gcr/ssh (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 18313)
Memory: 4K (peak: 1.7M)
CPU: 8ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/gcr-ssh-agent.socket

Jul 01 19:41:42 g14 systemd[1365]: Starting GCR ssh-agent wrapper…
Jul 01 19:41:42 g14 systemd[1365]: Listening on GCR ssh-agent wrapper.

Hi,
Please have a look at the following link and see if your issue is related:

Since it is afresh install, I’m not completely sure if it is the case but perhaps try restarting the ssh service as described in this article.

That’s pretty weird, I don’t seem to have an sshd service at all.

systemctl status sshd
○ sshd.service
     Loaded: masked (Reason: Unit sshd.service is masked.)
     Active: inactive (dead)
file /lib/systemd/system/sshd.service
/lib/systemd/system/sshd.service: empty

Unmask the service.

1 Like

It wasn’t masked, it was just empty (checked with file). For some reason re-installing openssh with pacman -S --overwrite \* openssh seems to have done the trick. Thanks for the help!

2 Likes

EndeavourOS ships openssh untouched unconfigured as it is from the package.
And indeed not enabled by default.

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