waveterm icon indicating copy to clipboard operation
waveterm copied to clipboard

[Bug]: Fail to ssh to remote server on windows 10 using key

Open xtianus opened this issue 2 months ago • 4 comments

Current Behavior

I have a remote server xxx.xxx.net that I access via ssh with an identity key. The server was already configured in C:\Users\xxxx\.ssh\config and I can connect with the ssh command from windows cmd. The connection configuration is picked up by Wave but when I click on it I can't connect and the "handshake failed" error is shown (as in the log below). The Wave log file has these lines:

2024-12-13 22:55:43.203 [wavesrv] 2024/12/13 22:55:43.203782 Connect [email protected]
2024-12-13 22:55:43.203 [wavesrv] 2024/12/13 22:55:43.203782 sending event: wps.WaveEvent{Event:"connchange", Scopes:[]string{"connection:[email protected]"}, Sender:"", Persist:0, Data:wshrpc.ConnStatus{Status:"connecting", WshEnabled:false, Connection:"[email protected]", Connected:false, HasConnected:false, ActiveConnNum:0, Error:"", WshError:""}}
2024-12-13 22:55:44.159 [wavesrv] 2024/12/13 22:55:44.160269 Failed to open Identity Agent Socket: dial unix .: connect: An invalid argument was supplied.
2024-12-13 22:55:44.360 [wavesrv] 2024/12/13 22:55:44.361681 error: failed to connect to client [email protected]: Connecting to &remote.SSHOpts{SSHHost:"xxx.xxx.net", SSHUser:"xxxx", SSHPort:0}, Error: ssh: handshake failed: Connecting to &remote.SSHOpts{SSHHost:"xxx.xxx.net", SSHUser:"xxxx", SSHPort:0}, Error: no identity files remaining
2024-12-13 22:55:44.361 [wavesrv] 2024/12/13 22:55:44.361681 sending event: wps.WaveEvent{Event:"connchange", Scopes:[]string{"connection:[email protected]"}, Sender:"", Persist:0, Data:wshrpc.ConnStatus{Status:"error", WshEnabled:false, Connection:"[email protected]", Connected:false, HasConnected:false, ActiveConnNum:0, Error:"Connecting to &remote.SSHOpts{SSHHost:\"xxx.xxx.net\", SSHUser:\"xxxx\", SSHPort:0}, Error: ssh: handshake failed: Connecting to &remote.SSHOpts{SSHHost:\"xxx.xxx.net\", SSHUser:\"xxxx\", SSHPort:0}, Error: no identity files remaining", WshError:""}}

The server auth.log has these lines:

Dec 13 22:55:43 heta sshd[22850]: rexec line 16: Deprecated option UsePrivilegeSeparation
Dec 13 22:55:43 heta sshd[22850]: rexec line 19: Deprecated option KeyRegenerationInterval
Dec 13 22:55:43 heta sshd[22850]: rexec line 20: Deprecated option ServerKeyBits
Dec 13 22:55:43 heta sshd[22850]: rexec line 31: Deprecated option RSAAuthentication
Dec 13 22:55:43 heta sshd[22850]: rexec line 38: Deprecated option RhostsRSAAuthentication
Dec 13 22:55:44 heta sshd[22850]: reprocess config line 31: Deprecated option RSAAuthentication
Dec 13 22:55:44 heta sshd[22850]: reprocess config line 38: Deprecated option RhostsRSAAuthentication
Dec 13 22:55:44 heta sshd[22850]: Connection closed by authenticating user xxxx yyy.yyy.yyy.yyy port zzzzz [preauth]

(the deprecation lines are always there also for successful connections)

Expected Behavior

I'd expect to connect.

Steps To Reproduce

  1. start Wave
  2. type ALT+G to see a list of remote connections
  3. click on one remote connection --> the error is shown

Wave Version

0.10.1 (202412130332)

Platform

Windows

OS Version/Distribution

Edition Windows 10 Pro Version 22H2 Installed on ‎07/‎09/‎2020 OS build 19045.5247 Experience Windows Feature Experience Pack 1000.19060.1000.0

Architecture

x86_64

Anything else?

No response

Questionnaire

  • [ ] I'm interested in fixing this myself but don't know where to start
  • [ ] I would like to fix and I have a solution
  • [ ] I don't have time to fix this right now, but maybe later

xtianus avatar Dec 13 '24 22:12 xtianus