ssh2incus provides a full-featured SSH server that connects directly to Incus containers and virtual machines.
It runs on the Incus host and intelligently routes incoming SSH connections to the appropriate instances using the Incus API, eliminating the need to run SSH servers inside the instances.
This is free and open source software.
Key Features
- On-Demand Instance Creation:
- Create persistent instances with + prefix (e.g., ssh +test01@host).
- Create ephemeral instances with ~ prefix (auto-delete on poweroff).
- Inline configuration: ssh +test+ubuntu/24.04+m4+c2+d20+nest+priv@host.
- Template-based defaults via create-config.yaml.
- Flexible Authentication:
- Public key authentication using host SSH keys (default).
- Password authentication support (
--password-auth). - Instance-based SSH key authentication (
--inauth). - Multi-factor authentication chains (
--auth-methods). - No-auth mode for development environments (
--noauth).
- Multiple Remotes: Connect to any remote from incus remote list.
- Terminal Support: Full PTY (terminal) mode and remote command execution.
- File Transfer: Complete SCP and SFTP support with integrated SFTP server.
- Port Forwarding:
- Local forwarding (ssh -L).
- Reverse forwarding (ssh -R).
- Dynamic forwarding (ssh -D).
- SSH Agent Forwarding: Seamlessly forward your SSH agent into instance sessions.
- Process Models:
- Master process mode: Maintains SSH connections after service restart.
- Daemon mode: Single process with multiple threads for resource-constrained systems.
- Incus Shell: Manage Incus over SSH.
- Terminal Session Management:
- Persistent sessions with % prefix (survives SSH disconnections).
- Terminal multiplexer support (tmux or screen).
- Built-in tmux binary deployment for instances without tmux.
- Automatic package installation for missing terminal multiplexers.
- System Integration:
- Cross-platform package management (Debian, RHEL, Alpine).
- Automatic OS detection and package manager selection.
- Instance configuration templates (create-config.yaml).
- Compatibility:
- Built using Incus 6.16 API (updated from 6.11).
- Works with Incus inside Lima and Colima.
- Tested with Jetbrains Gateway, VSCode, Cursor and other IDEs.
- Full Ansible support.
Website: github.com/mobydeck/ssh2incus
Support:
Developer: mobydeck
License: GNU General Public License v3.0

ssh2incus is written in Go. Learn Go with our recommended free books and free tutorials.
Related Software
| SSH Servers | |
|---|---|
| OpenSSH | Remote login with the SSH protocol |
| Teleport | Provides connectivity, authentication, access controls and audit for infrastructure |
| ssh3 | Faster and rich secure shell using HTTP/3 |
| TinySSH | Minimalistic SSH server |
| Dropbear | Lightweight SSH server |
| quicssh-rs | Simple ssh server |
| ssh2incus | SSH server for Incus instances |
| Russh | Low-level Tokio SSH2 client and server implementation |
| wolfSSH | Small, fast, portable SSH implementation |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

