I cannot SSH on my remote server (Ubuntu 22). When I try, it loads indefinitely. Here is the ouptut of a ssh -v:
Authenticated to x.x.x.x ([x.x.x.x]:22) using "password".debug1: channel 0: new session [client-session] (inactive timeout: 0)debug1: Requesting no-more-sessions@openssh.comdebug1: Entering interactive session.debug1: pledge: filesystem
I looked it up and came across this post and a few others.
I tried running systemctl restart systemd-logind
but it just times out:
(running from a VM so I cannot copy/paste, sorry).
As for journalctl, here it is:
I also tried to comment out this line: #session optional pam_systemd.so
in /etc/pam.d/common-session and to add UseDNS no
in /etc/ssh/sshd_config, according to different forum answsers.
I read somewhere that /etc/var/log/btmp could be too big and crash, but mine does not seem to be too large:
Also, it should be noted that after running systemctl restart systemd-logind
, sometimes the SSH connection returns for a few seconds and stops again.
Many thanks in advance for your help.