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

Aberta
#1,862 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
12/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp
Domínio
networking, security

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
C#
Estrelas
4.4k
Forks
987
Merge médio
2d 6h
PRs com merge (30d)
4

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de sshnet/SSH.NET

Todas as issues de sshnet/SSH.NET

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.