Questions tagged [mosh]

(Mobile Shell) - Mosh is a replacement for SSH which uses SSH to initiate the connection and UDP for later communication in order to support roaming and intermittent connectivity

Mosh (“mobile shell”) is a remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes. Mosh communicates over UDP. It is intended as a replacement for ssh, though an ssh client and server are still needed to initiate the connection.

External links

26 questions
88
votes
4 answers

Use Mosh without giving up local scrollback / history?

Is there a way to use mosh without giving up the local scrollback? Basically, in some circumstances, IP-roaming is indeed useful and needed, but the extra terminal emulation and key prediction seems to only be getting rid of the local scrollback…
cnst
  • 3,223
  • 2
  • 23
  • 44
22
votes
1 answer

Can I re-attach to a detached mosh session?

When I connect using mosh I get the following error: Mosh: You have 2 detached Mosh sessions on this server, with PIDs: - mosh [3700] - mosh [31091] How can I resume one of these sessions?
Mohammad Moghimi
  • 323
  • 1
  • 2
  • 6
18
votes
2 answers

mosh-server needs a UTF-8 native locale to run

I am trying to connect from my Gentoo to RHEL server. Both have mosh installed, however I get this error: petanb@localhost ~/Documents $ mosh root@server mosh-server needs a UTF-8 native locale to run. Unfortunately, the local environment ([no…
Petr
  • 1,691
  • 4
  • 21
  • 31
16
votes
3 answers

Mosh with port forwarding (like SSH)

When connecting to my development server via ssh, I can forward remote ports to local ports via: ssh [email protected] -L 5432:localhost:5432 However I'd rather use mosh because my connection tends to drop. I tried extending my usual mosh command…
geberl
  • 431
  • 1
  • 4
  • 13
14
votes
1 answer

Mosh: Retain backscroll beyond terminal window height

I'm experimenting using Mosh instead of raw SSH for remote shell connections. So far I like it, but I've become used to being able to page-up or scroll through backscroll in my terminal window to see the results of older commands or commands that…
Garrett Albright
  • 497
  • 5
  • 12
7
votes
1 answer

Mosh doesn't reconnect

I installed mosh on a desktop and server yesterday (compiled latest v1.2.3 from source) and it works fine. I left the session open yesterday and have come into the office today to find my mosh session is dead, with the error along the top of the…
jwbensley
  • 7,402
  • 11
  • 35
  • 43
7
votes
1 answer

Do I have to install mosh-server on my server to use Mosh?

I have installed mosh on my MacOS via brew. Everything went perfect. After I tried to connect to my server, I got a message: localhost:~ darkstaff$ mosh root@*.*.*.* root@*.*.*.*'s password: bash: mosh-server: command not found Connection to…
AGamePlayer
  • 7,415
  • 16
  • 46
  • 55
6
votes
1 answer

Detect whether the current terminal is through mosh or not

I am trying to figure out a way to detect whether the current terminal/connection (and under a tmux session as well) is through mosh or not. From this thread, I found which pseudo-terminal session I am currently on: $ tty /dev/pts/69 So, I need to…
Jongwook Choi
  • 1,663
  • 1
  • 9
  • 8
6
votes
1 answer

Persistently mount remote filesystem? i.e. SSHFS/mosh?

I work with a very large remote filesystem, so I like to use mosh instead of ssh for low-connectivity persistent connections, or just when my computer sleeps. For editing files though, I mount the remote filesystem with SSHFS so I can use my…
5
votes
1 answer

Don't nest tmux in a remote ssh shell

I've set up the .zshrc of my user account on all of the hosts to which I connect to automatically start tmux on login as long as it's not already running. if [ -z "$TMUX" ]; then tmux attach -d || tmux new fi This works well until I ssh (or…
5
votes
0 answers

File transfer over mosh

I am using mosh for my regular terminal based activities. However I have also remote file sever access (via sftp) in nautilus. (I am using Ubuntu 16.10 with unity). (In nautilus, in the URL bar, I just…
Mike V.D.C.
  • 278
  • 2
  • 10
5
votes
1 answer

How do I know which Mosh Client I am?

When I try who, I frequently see output such as this: username pts/0 2015-10-09 04:48 (mosh [2680]) username pts/2 2015-10-12 00:04 (75.139.11.119 via mosh [12364]) username pts/6 2015-10-12 00:10 (75.139.11.119 via mosh…
Startec
  • 1,839
  • 4
  • 24
  • 27
5
votes
2 answers

sshfs over mosh tunnel

I am using sshfs over ssh tunnel. The reason for this is because I do not have direct access to machine from which I want to mount file system. This command establishes me tunnel: ssh -o TCPKeepAlive=no -o ServerAliveInterval=15 -o…
Wakan Tanka
  • 755
  • 11
  • 25
4
votes
2 answers

Tab completion on mosh (ssh) alias?

I've just started using mosh and I'm left thinking to myself "why didn't I start using this like two years ago?" I'm even more impressed by the fact that it reads my ~/.ssh/config and respects the aliases in it. The only thing I'd like now is for…
bitofagoob
  • 1,335
  • 2
  • 15
  • 24
4
votes
1 answer

Mosh to a specific remote shell

With ssh, I can do something like the following: ssh user@host -t /path/to/some/shell How can I automatically launch a shell on the server with mosh? I have tried with mosh user@host -ssh /path/to/some/shell and with: mosh user@host -ssh "ssh -t…
Amelio Vazquez-Reina
  • 40,169
  • 77
  • 197
  • 294
1
2