[GH-ISSUE #1071] Host aliases in ssh config runs command on server #625

Closed
opened 2026-02-27 00:00:19 +03:00 by kerem · 3 comments
Owner

Originally created by @jamesj2 on GitHub (Jan 13, 2019).
Original GitHub issue: https://github.com/electerm/electerm/issues/1071

Electerm version: 0.26.12

Operating system(linux, macos, or windows7/8/10?):

linux

Expected Behavior

Connect to host from ssh-config when host aliases are present without attempting to run a command.

Current Behavior

Connect to host from ssh-config when host aliases are present results in running a command on server and a closed connection.

Possible Solution

Only use the first entry from ssh-config's Host parameter.

Steps to Reproduce

  1. Setup a ssh config that has host aliases like "Host github.com github"
  2. Click ssh-config: github.com github under Bookmarks
  3. Results in a connection but it tries to execute "github", output: "bash: github: command not found" and closes the connection.
Originally created by @jamesj2 on GitHub (Jan 13, 2019). Original GitHub issue: https://github.com/electerm/electerm/issues/1071 ## Electerm version: 0.26.12 ## Operating system(linux, macos, or windows7/8/10?): linux ## Expected Behavior Connect to host from ssh-config when host aliases are present without attempting to run a command. ## Current Behavior Connect to host from ssh-config when host aliases are present results in running a command on server and a closed connection. ## Possible Solution Only use the first entry from ssh-config's Host parameter. ## Steps to Reproduce 1. Setup a ssh config that has host aliases like "Host github.com github" 2. Click ssh-config: github.com github under Bookmarks 3. Results in a connection but it tries to execute "github", output: "bash: github: command not found" and closes the connection.
kerem 2026-02-27 00:00:19 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@zxdong262 commented on GitHub (Jan 15, 2019):

Hi @jamesj2 Can you give a more detailed example ssh config?

<!-- gh-comment-id:454249478 --> @zxdong262 commented on GitHub (Jan 15, 2019): Hi @jamesj2 Can you give a more detailed example ssh config?
Author
Owner

@jamesj2 commented on GitHub (Jan 15, 2019):

Host ssh.blinkenshell.org blinken blink
  HostName ssh.blinkenshell.org

Click [ssh-config]:ssh.blinkenshell.org blinken blink under bookmarks. You get a new terminal with the following output.

[james@james-pc ~]$ ssh ssh.blinkenshell.org blinken blink
bash: blinken: command not found
<!-- gh-comment-id:454458568 --> @jamesj2 commented on GitHub (Jan 15, 2019): ``` Host ssh.blinkenshell.org blinken blink HostName ssh.blinkenshell.org ``` Click [ssh-config]:ssh.blinkenshell.org blinken blink under bookmarks. You get a new terminal with the following output. ``` [james@james-pc ~]$ ssh ssh.blinkenshell.org blinken blink bash: blinken: command not found ```
Author
Owner

@zxdong262 commented on GitHub (Jan 16, 2019):

@jamesj2 Released new version, thank you for the feedback!

<!-- gh-comment-id:454607197 --> @zxdong262 commented on GitHub (Jan 16, 2019): @jamesj2 Released new version, thank you for the feedback!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#625
No description provided.