Support SSH connections over direct-tcpip channels without a local TCP listener

Aperta
#1,862 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

The request concerns the port-forwarding and channel code in the SSH.NET library, where ForwardedPortLocal currently opens a local listener. Start by reading how direct-tcpip channels are opened and how SshClient and SftpClient establish their transport. Done would be a public API that connects a target client through an existing jump-host session without a listener, with tests covering per-hop authentication and cancellation. This is design work with no comments yet.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

We use SSH.NET 2026.0.0 for SSH and SFTP connections through jump hosts.

Our current implementation connects to the jump host, starts a ForwardedPortLocal on an ephemeral loopback port, and connects the target SshClient or SftpClient through that port.

The local listener remains accessible to other local processes for the lifetime of the connection. Those processes still need to authenticate to the target, but they gain network access through the application's authenticated jump-host connection.

Stopping the forwarded port also closes its active channels, so calling Stop() after the target handshake does not solve this.

Requested capability

Provide a supported public API for connecting SshClient and SftpClient through an authenticated jump-host connection without creating a local TCP listener.

Possible API directions:

  • Native jump-host support.
  • Exposing a direct-tcpip channel as a duplex transport, with a way to connect an SSH client over that transport.

These are suggestions; we would welcome an approach that fits SSH.NET's architecture.

Required behavior

  • Preserve independent authentication and host key verification for each hop.
  • Support password, private key, and externally supplied agent-backed authentication methods.
  • Support cancellation during channel opening and target connection establishment.
  • Keep the channel operational throughout
Lingua principale
C#
Stelle
4.4k
Fork
987
Merge medio
2g 6h
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sshnet/SSH.NET

Tutte le issue di sshnet/SSH.NET

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.