[PR #983] [MERGED] Fix ssh connection freeze #13207

Closed
opened 2026-08-05 02:07:45 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/983
Author: @pascal-fischer
Created: 6/23/2023
Status: Merged
Merged: 6/27/2023
Merged by: @pascal-fischer

Base: mainHead: fix/ssh_connection_freeze


📝 Commits (4)

📊 Changes

2 files changed (+38 additions, -15 deletions)

View changed files

📝 client/cmd/ssh.go (+6 -7)
📝 client/ssh/server.go (+32 -8)

📄 Description

Describe your changes

The ssh connection was freezing when accessing amazon linux to nodes or if the username did not exist.

Changes:

  • wait for terminal session to be ready to avoid freeze
  • sending proper error codes to cli if failure
  • sending log message on ssh session attempt

To Test

  • ssh connections between Linux <-> Mac, Mac <-> Mac, Linux <-> Linux (Either one or all cases)
  • test ssh connection to an Amazon Linux 2 machine
  • test connection to offline peer
  • test connection to non existing peer
  • test connection to online peer but non existing user

https://github.com/netbirdio/netbird/issues/514

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/983 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 6/23/2023 **Status:** ✅ Merged **Merged:** 6/27/2023 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `fix/ssh_connection_freeze` --- ### 📝 Commits (4) - [`2691e72`](https://github.com/netbirdio/netbird/commit/2691e729cdcddea2c8571068a36e0733778735c6) fix ssh - [`f7d97b0`](https://github.com/netbirdio/netbird/commit/f7d97b02fd585e882b778f382b83aa94a4d06621) fix error codes on cli - [`68a8687`](https://github.com/netbirdio/netbird/commit/68a8687c8043c4e4d04335e73edc03f215625739) fix linter - [`8eb098d`](https://github.com/netbirdio/netbird/commit/8eb098d6fde77e296e2bed0e26450cf4b409b17f) add sleep and comment ### 📊 Changes **2 files changed** (+38 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/ssh.go` (+6 -7) 📝 `client/ssh/server.go` (+32 -8) </details> ### 📄 Description ## Describe your changes The ssh connection was freezing when accessing amazon linux to nodes or if the username did not exist. Changes: - wait for terminal session to be ready to avoid freeze - sending proper error codes to cli if failure - sending log message on ssh session attempt ### To Test - ssh connections between Linux <-> Mac, Mac <-> Mac, Linux <-> Linux **(Either one or all cases)** - test ssh connection to an Amazon Linux 2 machine - test connection to offline peer - test connection to non existing peer - test connection to online peer but non existing user ## Issue ticket number and link https://github.com/netbirdio/netbird/issues/514 ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:07:45 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#13207