quicssh-rs
๐ quicssh-rs is a QUIC proxy that allows to use QUIC to connect to an SSH server without needing to patch the client or the server.
quicssh-rs
is quicssh rust implementation. It is based on quinn and tokio
Why use QUIC? Because SSH is vulnerable in TCP connection environments, and most SSH packets are actually small, so it is only necessary to maintain the SSH connection to use it in any network environment. QUIC is a good choice because it has good weak network optimization and an important feature called connection migration. This means that I can switch Wi-Fi networks freely when remote, ensuring a stable SSH connection.
Demo
demo-quicssh-rs.mp4
Why not mosh?
Because the architecture of mosh requires the opening of many ports to support control and data connections, which is not very user-friendly in many environments. In addition, vscode remote development does not support mosh.
Architecture
Standard SSH connection
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ
โ bob โ โ wopr โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโโโโ โ
โ โ ssh user@wopr โโโผโโโโtcpโโโโโโโผโถโ sshd โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ
SSH Connection proxified with QUIC
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ
โ bob โ โ wopr โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโโโโ โ
โ โssh -o ProxyCommand "quicssh-rs โ โ โ โ sshd โ โ
โ โ client quic://%h:4433 โ โ โ โโโโโโโโโโโโโโโโโโโโโ โ
โ โ user@wopr โ โ โ โฒ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ
โ โ โ โ โ โ
โ process โ โ tcp to localhost:22 โ
โ โ โ โ โ โ
โ โผ โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ quicssh-rs client wopr:4433 โโโผโquic (udp)โโโถโ quicssh-rs server โโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ
Usage
$ quicssh-rs -h
A simple ssh server based on quic protocol
Usage: quicssh-rs [OPTIONS] <COMMAND>
Commands:
server Server
client Client
help Print this message or the help of the given subcommand(s)
Options:
--log <LOG_FILE> Location of log, Defalt if
-h, --help Print help
-V, --version Print version
Client
$ quicssh-rs client -h
Client
Usage: quicssh-rs client <URL>
Arguments:
<URL> Sewrver address
Options:
-h, --help Print help
-V, --version Print version
Client SSH Config
โฐโ$ cat ~/.ssh/config
Host test
HostName test.test
User root
Port 22333
ProxyCommand /Users/ouyangjun/code/quicssh-rs/target/release/quicssh-rs client quic://%h:%p
โฐโ$ ssh test
Last login: Mon May 1 13:32:15 2023 from 127.0.0.1
Server
$ quicssh-rs server -h
Server
Usage: quicssh-rs server [OPTIONS]
Options:
-l, --listen <LISTEN> Address to listen on [default: 0.0.0.0:4433]
-h, --help Print help
-V, --version Print version