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

Abierto
#1,862 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
12/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
C#
Estrellas
4.4k
Forks
987
Merge medio
2 d 6 h
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sshnet/SSH.NET

Todos los issues de sshnet/SSH.NET

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.