wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.75k stars 751 forks source link

wezterm ssh Exited with code 1. #6131

Open jcyongqin opened 5 days ago

jcyongqin commented 5 days ago

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20240203-110809-5046fc22

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Using libssh-rs to connect to ABC@relay.ABC.com:22
Error: Connecting to relay.ABC.com:22: Fatal: kex error : no match for method server host key algo: server [ssh-rsa,ssh-dss], client [rsa-sha2-512,rsa-sha2-256,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com]

⚠️  Process RemoteSshDomain didn't exit cleanly
Exited with code 1.
This message is shown because exit_behavior="CloseOnCleanExit"

To Reproduce

No response

Configuration

no config

Expected Behavior

No response

Logs

no log

Anything else?

No response

bew commented 5 days ago

This error:

Error: Connecting to relay.ABC.com:22:
Fatal: kex error : 
no match for method server host key algo:
server [ssh-rsa,ssh-dss],
client [rsa-sha2-512,rsa-sha2-256,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com]

Means the server only supports security checks using ssh-rsa, or ssh-dss, which the client doesn't support.

The default ssh backend in wezterm is better suited for recent protocols. If you need to connect to a server that only support older protocols, you can try to add this config:

config.ssh_backend = "Ssh2"

ref: https://wezfurlong.org/wezterm/config/lua/config/ssh_backend.html