Skip to content
Back to skills

442 Mosh Resilient Ssh 1060ccf1

BSecurity

Connecting over unreliable networks (mobile, WiFi)

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
designbash

Works with

  • terminal
  • cli

Security analysis

B88/100
  • criticalAccesses sensitive system or user directories

Pro scans all 2 files and shows the line behind each finding

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 442-mosh-resilient-ssh_1060ccf1 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 442 Mosh Resilient Ssh 1060ccf1?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 442 Mosh Resilient Ssh 1060ccf1
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-442-mosh-resilient-ssh-1060ccf1/badge)](https://www.skillsdirectory.com/skills/tools-only-442-mosh-resilient-ssh-1060ccf1)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: networking-mosh-resilient-ssh
description: Connecting over unreliable networks (mobile, WiFi)
---


# Mosh - Resilient SSH Alternative

**Use this skill when:**
- Connecting over unreliable networks (mobile, WiFi)
- Working with high-latency connections
- Needing to survive network disconnects
- Roaming between networks while maintaining sessions
- Improving SSH user experience

## Installation

```bash
# macOS
brew install mosh

# Ubuntu/Debian
sudo apt install mosh

# Server must also have mosh installed
```

## Basic Usage

```bash
# Instead of SSH
ssh user@server

# Use Mosh
mosh user@server

# With specific port
mosh --ssh="ssh -p 2222" user@server

# With different mosh port range
mosh -p 60001 user@server
```

## Key Features

### Survives Disconnects

```bash
# Start mosh session
mosh user@server

# Network disconnects (sleep laptop, switch WiFi)
# Session continues when network returns

# Compare to SSH:
# ssh user@server
# [network disconnect]
# -> Connection lost, need to reconnect
```

### Local Echo


# Mosh predicts typing locally
# No lag when typing even on high-latency links

# Underlined text = predicted (not yet confirmed by server)
# Normal text = confirmed by server


### IP Roaming

```bash
# Start mosh on WiFi
mosh user@server

# Switch to cellular
# Session continues seamlessly

# SSH would require reconnect
```

## Configuration

### Server Setup

```bash
# Open UDP ports (mosh uses 60000-61000 by default)
sudo ufw allow 60000:61000/udp

# Or specific range
sudo ufw allow 60001/udp
```

### Custom Port Range

```bash
# Server: restrict port range
export MOSH_SERVER_PORT_RANGE=60001-60010

# Client: use restricted range
mosh -p 60001 user@server
```

## Advanced Usage

### With Tailscale

```bash
# Use mosh over Tailscale
mosh user@100.64.0.5

# Benefits:
# - Encrypted by Tailscale
# - No need to open ports publicly
# - Resilient connection
```

### SSH Configuration

```bash
# ~/.ssh/config
Host myserver
    HostName server.example.com
    User myuser
    Port 2222

# Now use
mosh myserver
```

### Tmux Integration

```bash
# Ultimate resilient setup
mosh user@server -- tmux attach

# Benefits:
# - Mosh handles network disruption
# - Tmux persists session on server
# - Can disconnect mosh and reconnect to same tmux
```

## Limitations

### Not for File Transfers

```bash
# ❌ Can't use scp/rsync over mosh
# Mosh is terminal-only

# ✅ Use SSH for file transfers
scp file.txt user@server:

# Or rsync
rsync -avz --progress file.txt user@server:
```

### Port Requirements


# Mosh needs UDP ports open
# Some restrictive networks block UDP

# Fallback to SSH if UDP blocked


## Comparison


# SSH:
# - Works everywhere (TCP port 22)
# - File transfers (scp/sftp)
# - Port forwarding
# - Breaks on network change

# Mosh:
# - Survives disconnects
# - IP roaming
# - Low-latency typing
# - Requires UDP ports
# - Terminal only


## Related Skills

- **tailscale-vpn.md** - Use mosh over Tailscale
- **secure-networking.md** - Overall networking patterns

Files in this skill

  • README.md989 B
  • skill.md3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.