<div dir="ltr">Hi Andrew,<div><br></div><div>mosh doesn't use pam directly, and instead leverages ssh to do the initial authentication checks (whether it uses PAM or not is up to your system configuration). There's actually a long-standing open issue (<a href="https://github.com/mobile-shell/mosh/issues/529">https://github.com/mobile-shell/mosh/issues/529</a>) about improving this, but there's no solution agreed upon or timeline decided.</div><div><br></div><div>Depending on what you want to accomplish, a wrapper script around mosh-server might be the expedient way to solve your problem.</div><div><br></div><div>Sincerely,</div><div>-Alex</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Apr 16, 2025 at 9:53 AM Andrew C Aitchison <<a href="mailto:mosh@aitchison.me.uk">mosh@aitchison.me.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I use mosh to connect to a ubuntu machine.<br>
I had scripts which could tell me whether a session came from<br>
my phone or my tablet (assuming it was initiated on the local<br>
network), but recently bit rot has set in.<br>
<br>
The fundamental problem is that for a roaming protocol,<br>
the ip address does not identify the client device.<br>
<br>
First the transition to 64bit time with Ubuntu Oracular 24.10,<br>
meant a switch from wtmp to wtmpdb and pam stopped recording the pty<br>
so that `last` just said 'ssh' in the terminal column.<br>
<br>
Now Ubuntu Plucky 25.04 has broken `who`<br>
<a href="https://discourse.ubuntu.com/t/plucky-puffin-release-notes/48687#p-120902-systemd-v2574-8" rel="noreferrer" target="_blank">https://discourse.ubuntu.com/t/plucky-puffin-release-notes/48687#p-120902-systemd-v2574-8</a><br>
as "systemd is no longer built with utmp support".<br>
<br>
I'm wondering whether adding a pam module or config for mosh<br>
is the way to go ?<br>
<br>
Does anyone else have experience, thoughts or ideas on logging mosh <br>
sessions on current OSes ?<br>
<br>
Thanks,<br>
<br>
-- <br>
Andrew C. Aitchison                      Kendal, UK<br>
                    <a href="mailto:andrew@aitchison.me.uk" target="_blank">andrew@aitchison.me.uk</a><br>
_______________________________________________<br>
mosh-users mailing list<br>
<a href="mailto:mosh-users@mit.edu" target="_blank">mosh-users@mit.edu</a><br>
<a href="https://mailman.mit.edu/mailman/listinfo/mosh-users" rel="noreferrer" target="_blank">https://mailman.mit.edu/mailman/listinfo/mosh-users</a><br>
</blockquote></div>