You have detached Mosh sessions on this server

Software

There’s a ton of tech I take for granted but barely discuss. Mosh has received all but one blog mention here, but I use it daily. I consider it mandatory for administering FreeBSD, NetBSD, and Linux servers in remote availability zones.

Mosh sessions are specifically designed for fault tolerance. Unlike SSH, if you drop a connection, Mosh will continue to keep the session alive for you to reattach. No more ah crap, did I run that session inside a screen?!

The side effect of this is you may encounter these when you re-connect to a server:

Mosh: You have 2 detached Mosh sessions on this 
server, with PIDs:
    - mosh [49443]
    - mosh [80599]

If you don’t need them, just kill their process. Too easy:

# kill 49443

This also unintentionally demonstrates FreeBSD PID randomisation; specifically increment randomisation. Linux doesn’t support them, for better or worse depending on who you speak to. I concede they’re no panacea, and random PIDs can introduce their own problems, but security is abouy layers. It’s good FreeBSD affords us the option.

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

You can leave me a comment by contacting me, and I might publish your thoughts. Please read the FAQs first though.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!