sshnet / sshnet/SSH.NET

Can't use as socks tunnel on MAUI application (.net 8)

Open
#1,599 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

When I trying to use var _port= new ForwardedPortDynamic("127.0.0.1", 5000),
On that's code:

_client = new SshClient(s);
_client.HostKeyReceived += (sender, e) =>
{
    e.CanTrust = true;
};
_client.Connect();
_client.AddForwardedPort(_port);
_client.ErrorOccurred += _client_ErrorOccurred;
_port.Start();

I have received exception like "Session operation has timed out".
But when I have used _client.createCommand it's works fine and returns good output.
What's i doing wrong ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ForwardedPortDynamic entry point and the SshClient sequence shown: Connect, AddForwardedPort, and Start. Compare that forwarding path with the working CreateCommand call and investigate the reported session timeout; done means identifying the cause and establishing a reliable MAUI .NET 8 SOCKS-tunnel connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.