mobile-shell / mobile-shell/mosh

mosh login not showing in `w` output (Ubuntu 24.04)

Open
#1,335 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

support
Dominant language
C++
Stars
14.5k
Forks
865
PR merge metrics
No merged PRs in 30d

Description

I have multiple similarly configured servers. Two running Ubuntu 24.04 are showing no users in w output when I log in with mosh, but do show my login when I log in with ssh directly.

A server running RHEL 8.10, however, does show an entry when I'm logged in via mosh. The version of mosh on all systems is 1.40.

== RHEL 8.10 ==

cross@client-mac-host ~> ssh linux-server1.cisco.com w
 13:41:40 up 3 days, 22:57,  0 users,  load average: 0.00, 0.26, 2.68
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
cross@client-mac-host ~> ssh linux-server1.cisco.com  
cross@linux-server1 ~ ❯ w
 13:42:17 up 3 days, 22:57,  1 user,  load average: 0.24, 0.29, 2.58
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
cross    pts/2    2001:420:20c0::2 13:41    0.00s  0.19s  0.01s w
cross@linux-server1 ~ ❯ ^D
cross@client-mac-host ~> mosh --family=prefer-inet6 linux-server1.cisco.com
cross@linux-server1 ~ ❯ w
 13:43:07 up 3 days, 22:58,  1 user,  load average: 0.30, 0.29, 2.46
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
cross    pts/3    2001:420:20c0::2 13:43    0.00s  0.16s  0.01s w
cross@linux-server1 ~ ❯ 

== Ubuntu 24.04 ==

cross@client-mac-host ~> ssh linux-server3.cisco.com w
 13:50:05 up 20 days, 20:30,  4 users,  load average: 0.25, 0.13, 0.10
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU  WHAT
cross            2001:420:20c0::2 13:50   29:29m  0.00s  0.02s sshd: cross [priv]
cross@client-mac-host ~> ssh linux-server3.cisco.com  
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-51-generic x86_64)
cross@linux-server3 ~ ❯ w
 13:51:45 up 20 days, 20:31,  4 users,  load average: 0.30, 0.17, 0.11
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU  WHAT
cross            2001:420:20c0::2 13:51   29:30m  0.00s  0.02s sshd: cross [p
cross@linux-server3 ~ ❯ ^D
cross@client-mac-host ~> mosh --family=prefer-inet6 linux-server3.cisco.com
cross@linux-server3 ~ ❯ w
 13:52:28 up 20 days, 20:32,  4 users,  load average: 0.27, 0.18, 0.11
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU  WHAT
cross@linux-server3 ~ ❯ who | grep 2025-01-13
cross   pts/7        2025-01-13 13:52 (2001:420:20c0::2830 via mosh [2314904])
cross@linux-server3 ~ ❯ date
Mon Jan 13 13:53:07 EST 2025
cross@linux-server3 ~ ❯ ^D

I notice also that the effect of "w" as an inline command ssh'd over is different, but while that may be related to a solution, it's not a problem I'm worried about.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the difference with mosh, w, and who on Ubuntu 24.04 and RHEL 8.10, using the SSH and mosh command examples in the issue. Start by comparing how each system records the mosh session and how w filters or formats that record. Done means identifying the cause and restoring the expected mosh login entry in w without regressing the RHEL behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.