sshnet / sshnet/SSH.NET

Timeout on some connections

Open
#235 0 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

Hi, I use the control successfully for different connections. However, I have a problem with connecting to a device.

If I use Putty everything works properly, I open the connection and enter user and password and after I get the prompt

login as: admin
admin@192.168.1.210's password:

Entering character mode
Escape character is '^]'.

Command Line Interface
UserDevice>

If I use control instead

                ConnectionInfo ConnNfo = new ConnectionInfo(DirectIPDbDrone, 22, "admin",
                    new AuthenticationMethod[] { new PasswordAuthenticationMethod("admin", "xxxxxx"), }
                );

                using (var sshclient = new SshClient(ConnNfo))
                {
                    sshclient.Connect();
                    rVal = sshclient.CreateCommand("at+mwrssi").Execute();
                    sshclient.Disconnect();
                }

Remains locked on the sshclient.Connect () command; Until the timeout expires and then return the value

"\r\nCommand Line Interface\r\nUserDevice> Custom idle timeout\r\n"

How can I understand what's going on?

Thanks.

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

Review the SshClient.Connect path using the supplied ConnectionInfo and compare it with the PuTTY interaction, including the device's login and command-line prompts. Done means the timeout's cause and a reproducible resolution or limitation are established for this device scenario.

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.