[GH-ISSUE #1701] 建议支持原生 ssh 别名登录 #999

Closed
opened 2026-02-27 00:01:50 +03:00 by kerem · 0 comments
Owner

Originally created by @xiaoluhong on GitHub (May 17, 2020).
Original GitHub issue: https://github.com/electerm/electerm/issues/1701

Electerm version:

v1.3.28

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

MacOS 10.15.4

Expected Behavior

希望可以自动识别 ssh client 配置文件中的 主机别名 配置,然后可以自动连接。

Can you reproduce the same behavior in other terminal:

Current Behavior

Possible Solution

Steps to Reproduce

  1. 在ssh client 配置文件 ~/.ssh/config 中添加对应主机的别名配置,如图:
    image

  2. 正常情况,在 ssh 终端中只需要输入 ssh forums 即可连接主机

  3. 在 Electerm 的书签中可以看到有对应的主机,但是点击连接将会报错
    image

TypeError: this[(this.type + "Init")] is not a function at Terminal.init (/Applications/electerm.app/Contents/Resources/app.asar/server/session.js:69:36) at exports.terminal (/Applications/electerm.app/Contents/Resources/app.asar/server/session.js:807:14) at /Applications/electerm.app/Contents/Resources/app.asar/server/server.js:39:22 at Layer.handle [as handle_request] (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/layer.js:95:5) at next (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/route.js:137:13) at verify (/Applications/electerm.app/Contents/Resources/app.asar/server/server.js:28:3) at Layer.handle [as handle_request] (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/layer.js:95:5) at next (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/layer.js:95:5) at /Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:335:12) at next (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:275:10) at /Applications/electerm.app/Contents/Resources/app.asar/node_modules/body-parser/lib/read.js:130:5 at invokeCallback (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/raw-body/index.js:224:16) at done (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/raw-body/index.js:213:7)

Context (Environment)

Detailed Description

Suggestions?

Originally created by @xiaoluhong on GitHub (May 17, 2020). Original GitHub issue: https://github.com/electerm/electerm/issues/1701 <!--- Provide some basic info --> ## Electerm version: v1.3.28 ## Operating system(linux, macos, or windows7/8/10?): MacOS 10.15.4 ## Expected Behavior <!--- Tell me what should happen --> 希望可以自动识别 ssh client 配置文件中的 主机别名 配置,然后可以自动连接。 ## Can you reproduce the same behavior in other terminal: <!--- If same bahavior happens in other terminal, maybe it is supposed to be like this or not a problem of terminal app --> ## Current Behavior <!--- Tell me what happens instead of the expected behavior --> ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> ## Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> 1. 在ssh client 配置文件 ~/.ssh/config 中添加对应主机的别名配置,如图: ![image](https://user-images.githubusercontent.com/20707603/82141955-5d274a00-986b-11ea-9a31-628157c5e1d2.png) 2. 正常情况,在 ssh 终端中只需要输入 `ssh forums` 即可连接主机 3. 在 Electerm 的书签中可以看到有对应的主机,但是点击连接将会报错 ![image](https://user-images.githubusercontent.com/20707603/82142005-dd4daf80-986b-11ea-90d7-021ec509bac4.png) ```bash TypeError: this[(this.type + "Init")] is not a function at Terminal.init (/Applications/electerm.app/Contents/Resources/app.asar/server/session.js:69:36) at exports.terminal (/Applications/electerm.app/Contents/Resources/app.asar/server/session.js:807:14) at /Applications/electerm.app/Contents/Resources/app.asar/server/server.js:39:22 at Layer.handle [as handle_request] (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/layer.js:95:5) at next (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/route.js:137:13) at verify (/Applications/electerm.app/Contents/Resources/app.asar/server/server.js:28:3) at Layer.handle [as handle_request] (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/layer.js:95:5) at next (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/layer.js:95:5) at /Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:335:12) at next (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:275:10) at /Applications/electerm.app/Contents/Resources/app.asar/node_modules/body-parser/lib/read.js:130:5 at invokeCallback (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/raw-body/index.js:224:16) at done (/Applications/electerm.app/Contents/Resources/app.asar/node_modules/raw-body/index.js:213:7) ``` ## Context (Environment) <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> ## Detailed Description <!--- Provide a detailed description of the change or addition you are proposing --> ## Suggestions? <!--- Not a bug report, just some thoughts or suggestions? It is totally OK and welcome too -->
kerem 2026-02-27 00:01:50 +03:00
  • closed this issue
  • added the
    bug
    label
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#999
No description provided.