6

I did install Mosh on (1) a Mac OS X 10.9.5 machine, (2) a Debian 8 VM, and (3) as Entware-ng package on a router that runs an embedded Linux. Mosh connection from Mac (1) to (2) Debian is ok. Mosh connection from (1) Mac to (3) Linux embedded router fails with the message:

/usr/local/bin/mosh: Did not find mosh server startup message.

Environment:

  • Mosh version on the Mac is 1.2.5.
  • All machines are configured to ssh login with certificates.
  • Mac OS X shell is zsh.
  • /usr/local/bin is in the $PATH of the Mac OS X
  • Mac Terminal application is iTerm 2.1.4
  • Debian 8 is running in a 10.x pvm_nat LAN: parallels virtual machine with shared networking, that Parallels runs on the same Mac.
  • Command used to connect to Debian $ mosh username@10.x.x.x
  • Router rt-n56u is running at IP 192.168.x using a cabled LAN
  • Command to connnect from Mac to router is: $ mosh username@192.168.x.x
  • Linux router is running Padavan firmware RT-N56U_3.4.3.9-099_base.trx

Regression

  1. I did try to disable the Little Snitch firewall on the Mac with no improvement, still:
    /usr/local/bin/mosh: Did not find mosh server startup message.
  2. I did also try to start a debug session using:
    $ ssh -S none -o ProxyCommand='mosh --fake-proxy -- %h %p' -n -tt user@192.168.x.x -- 'mosh-server new'
    MOSH IP 192.168.x.x
    Connection to 192.168.x.x closed.
  3. I commented out SendEnv on the Mac:
    $ cat /etc/ssh_config | grep SendEnv
    # SendEnv LANG LC_*
  4. I have tried to disable the firewall on the router, which doesn't make any difference:
    /usr/local/bin/mosh: Did not find mosh server startup message.

The rt-n56u log displays this:

May  3 00:42:15 dropbear[819]: Child connection from 192.168.x.y:50824
May  3 00:42:17 dropbear[819]: Pubkey auth succeeded for 'username' with key md5 2c:...:94 from 192.168.x.y:50824
May  3 00:42:18 dropbear[820]: ioctl(TIOCSCTTY): Input/output error
May  3 00:42:18 dropbear[820]: /dev/pts/0: No such file or directory
May  3 00:42:18 dropbear[820]: open /dev/tty failed - could not set controlling tty: No such device or address
May  3 00:42:18 dropbear[819]: Exit (username): Disconnect received

On the rt-n56u:

# ls -l /dev/pts/*
crw--w--w-    1 username   root      136,   0 May  3 00:45 /dev/pts/0
# ls -l /dev/tty
crw-rw----    1 username   root        5,   0 Jan  1  2015 /dev/tty

What can be done to fix the mosh connection from this Mac to rt-n56u router?

2

Check where the mosh-server binary is installed in the embedded Linux, and pass that path to the server option in your mosh command.

Suppose the mosh-server binary is installed in /usr/bin/ directory in the embedded Linux, then run mosh like:

$ mosh --server=/usr/bin/mosh-server username@192.168.x.x
| improve this answer | |
2

I hope this helps, this problem also happened to me with same message, I'm not an expert yet i solved this way:

Analog to your config (3) and (1) my server is running Ubuntu Server 18.04 and my client is an iMac running Mojave.

  1. On the server y run:

    $ echo $LANG

    en_US.UTF-8

  2. Then search the mosh-server path, it was on /usr/bin/mosh-server

  3. On the Mac change the last line in /etc/ssh/ssh_config to SendEnv LANG en_US.UTF-8 like the previus server output.

  4. The command i use for mosh is like this indicating the mosh-server path and ssh port:

    $ mosh --server=/usr/bin/mosh-server user@host.domain.org --ssh="ssh -p XXXX"

| improve this answer | |
  • Welcome to SuperUser! The original post configuration doesn't match the configuration in your answer, so unless you are suggesting that they change their configuration I don't know how useful this is. It may be helpful for you take a moment to take the SuperUser tour. If you follow the norms of the SuperUser community and approach it with an attitude of helping others too, it will serve you well. – Rey Juna Mar 14 '19 at 1:59
  • Thanks for your suggestion @Rey Juna, I edit the answer to clarify the reference to the question and read de SuperUser tour and I'm hopping to help accordingly. – Noel Matías Mar 25 '19 at 22:19
  • Perfect! Worked for me! – francisaugusto May 1 at 15:03
0

Export LC_CTYPE to value of LANG(echo $LANG) of that of the mosh server.

| improve this answer | |
  • 2
    Can you expand on how the OP would do this? Please take a look at How to Answer and take our tour. – Burgi Nov 22 '18 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.