sourcediver.org

about software and freediving

Fixing Mosh on Arch Linux

I have been using mosh for quite some time, especially when using high latency/packet loss connections.

Error

However, mosh stopped working some time ago. The error message on the remote machine was something like this:

1
2
3
4
5
6
7
8
9
10
11
12
➜  ~ mosh-server new -v 

MOSH CONNECT 60001 VTFq5VGSoBtFl0DibKMrBw

mosh-server (mosh 1.2.4)
Copyright 2012 Keith Winstein <mosh-devel@mit.edu>
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

[mosh-server detached, pid = 6204]
forkpty: Operation not permitted

Fix

Notice the error message on the bottom. After some debugging I found out that the user needs to be in the tty group to perform forkpty() on Arch Linux. After executing sudo gpasswd -a $USER tty mosh worked again.

Other Problems

You should also make sure that you have the following line in your /etc/fstab

1
devpts                  /dev/pts      devpts    defaults            0      0

Comments