sshnet / sshnet/SSH.NET

SSH.Net with Dropbear: Session close after 30 minutes

Open
#568 4 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

We are using Dropbear with SSH.Net for an application.

Setup:

  • The Dropbear is installed on Ubuntu 18.04 on an x86 system.
  • Our SSHClient uses Key based authentication mechanism.
  • Connection works normally in the beginning.
  • After 30 minutes however, the session disconnects abruptly.
  • This behaviour is consistant every time.

Changes attempted:

  • We have checked for successful rekeying by reducing the re-keying time in Dropbear to 15 minutes.
  • We have passed -K 60 to Dropbear in an attempt to extend connection time.
  • We have changed SSH.Net connection with timeout and channelclosetimeout to 20 minutes
  • We have used KeepAliveInterval of 1 minute (as well as 10 seconds) in SSH.Net

Environment:

  • We have used the latest dropbear (version 2019.78)
  • We have tried this with the SSH.Net (version 2016.1.0 (master / develpment / cwl) branches and tried it against the forks of SSH.net.core branches)
  • We have tried the Nuget package (2016.1.0) available in Visual Studio as well as the Nuget package with support for .net core SSH.Net.Fork(2018.8.25.2)

Other test case combinations tried and working so far:

  • OpenSSH with SSH.Net
  • Putty with OpenSSH
  • Putty with Dropbear

Has anybody faced this kind of disconnection?

Does anyone have any recommendation or workaround for this problem?

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 at the SSHClient connection and keepalive behavior, reproducing the repeatable 30-minute disconnect against Dropbear 2019.78 on Ubuntu 18.04. Compare the listed rekeying, timeout, channel-close-timeout, and KeepAliveInterval configurations with the working OpenSSH and PuTTY combinations. Done means identifying a confirmed cause or documenting a reliable workaround.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.