[mosh-users] Mosh session logging

Alex Chernyakhovsky achernya at mit.edu
Thu Apr 17 10:30:28 EDT 2025


Hi Andrew,

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 (
https://github.com/mobile-shell/mosh/issues/529) about improving this, but
there's no solution agreed upon or timeline decided.

Depending on what you want to accomplish, a wrapper script around
mosh-server might be the expedient way to solve your problem.

Sincerely,
-Alex

On Wed, Apr 16, 2025 at 9:53 AM Andrew C Aitchison <mosh at aitchison.me.uk>
wrote:

>
> I use mosh to connect to a ubuntu machine.
> I had scripts which could tell me whether a session came from
> my phone or my tablet (assuming it was initiated on the local
> network), but recently bit rot has set in.
>
> The fundamental problem is that for a roaming protocol,
> the ip address does not identify the client device.
>
> First the transition to 64bit time with Ubuntu Oracular 24.10,
> meant a switch from wtmp to wtmpdb and pam stopped recording the pty
> so that `last` just said 'ssh' in the terminal column.
>
> Now Ubuntu Plucky 25.04 has broken `who`
>
> https://discourse.ubuntu.com/t/plucky-puffin-release-notes/48687#p-120902-systemd-v2574-8
> as "systemd is no longer built with utmp support".
>
> I'm wondering whether adding a pam module or config for mosh
> is the way to go ?
>
> Does anyone else have experience, thoughts or ideas on logging mosh
> sessions on current OSes ?
>
> Thanks,
>
> --
> Andrew C. Aitchison                      Kendal, UK
>                     andrew at aitchison.me.uk
> _______________________________________________
> mosh-users mailing list
> mosh-users at mit.edu
> https://mailman.mit.edu/mailman/listinfo/mosh-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mit.edu/pipermail/mosh-users/attachments/20250417/550200f7/attachment.htm>


More information about the mosh-users mailing list