<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>54077</bug_id>
          
          <creation_ts>2025-04-30 13:51:26 +0300</creation_ts>
          <short_desc>Не держит открытой сессию пользователя, которую запускает</short_desc>
          <delta_ts>2025-04-30 14:12:31 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>mosh</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Artem Varaksa">varaksaaa</reporter>
          <assigned_to name="Ivan A. Melnikov">iv</assigned_to>
          <cc>admsasha</cc>
    
    <cc>iv</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>263839</commentid>
    <comment_count>0</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2025-04-30 13:51:26 +0300</bug_when>
    <thetext>Шаги
====

1. На сервере и клиенте: # apt-get install -y mosh
2. На клиенте: # mosh test@&lt;server-ip&gt; (любой пользователь, не root)

Фактический результат
=====================

Выводится баннер &quot;Nothing received from UDP port 60001&quot; и через некоторое время:

&gt; mosh did not make a successful connection to &lt;ip&gt;:60001.
&gt; Please verify that UDP port 60001 is not firewalled and can reach the server.
&gt;
&gt; (By default, mosh uses a UDP port between 60000 and 61000. The -p option
&gt; selects a specific UDP port number.)
&gt; [mosh is exiting.]

Ожидаемый результат
===================

Успешное подключение.

Дополнительно
=============

Workaround:

# apt-get install -y systemd-settings-disable-kill-user-processes &amp;&amp; \
    reboot


Также возможно подключение вручную, но подключение прервется, как только закроется соединение SSH, что не позволяет использовать одну из основных возможностей mosh - хорошую работу при прерывающемся соединении:

$ ssh test@&lt;ip&gt;
test@&lt;ip&gt; -&gt; $ mosh-server
MOSH CONNECT 60001 xCC8EAHYN00JvTASfGjJfA
...
[mosh-server detached, pid = ...]

Не выходя из сеанса ssh test@&lt;ip&gt;, выполнить на тестируемой машине:

$ MOSH_KEY=xCC8EAHYN00JvTASfGjJfA mosh-client &lt;ip&gt; 60001

Воспроизводимость
=================

Воспроизводится на виртуальных машинах:

[sisyphus] ALT Server 11.0 beta 20250213 x86_64
mosh-1.4.0-alt1.2.x86_64

[p11+377171] ALT Server 11.0 beta 20250213 x86_64
mosh-1.4.0-alt1.2.x86_64

[p11] ALT Server 11.0 beta 20250213 x86_64
mosh-1.4.0-alt1.x86_64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>263841</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2025-04-30 14:12:31 +0300</bug_when>
    <thetext>К сожалению это известная проблема, например https://github.com/mobile-shell/mosh/issues/1171 -- сlosed as not planned.

Можно ещё почитать в целом https://github.com/mobile-shell/mosh/issues?q=systemd 

и дискуссию в Debian, хейтерам systemd должно понравится: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394

Так что вряд ли это кто-то будет чинить, но если что за апстримом я слежу.

Сам я использую mosh для подключения к уже существующей сессии с tmux:

urxvt -e mosh &quot;${host}&quot; --server=&apos;systemd-run --scope --user mosh-server new&apos; -- tmux att

Другие workaround&apos;ы Вы приводите выше. Буду благодарен, если Вы напишите что-нибудь про mosh на altlinux.org.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>