waveterm
waveterm copied to clipboard
Update to 0.7.x - Unable to SSH to Machines
Describe the bug Unable to ssh into any machine. Reverting to an older version allows the application to SSH into other machines without issue.
To Reproduce Steps to reproduce the behavior: Update to version 0.7.x from 0.6.x
Expected behavior ssh to work correctly.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: MacOS M1 Max
- Version 0.7.1
Additional context Valid ssh sessions with no changes to my known_hosts file.
Clearing the known_hosts file did not make any changes to this issue.
Interesting--I would have expected clearing the known_hosts to at least temporarily make it go away. I'm really hoping it isn't an underlying bug in the library we're using. In the meantime, there are a few other things we could look at.
Which keywords are you using for this connection in your ssh_config file? You don't need to tell me anything like user and/or hostname, but it's possible there are more obscure ones that we don't support yet.
If you take a look at the known_hosts file, could you check what type of key is causing the error? (It should say before the key itself)
Same here after an update but different error. Ubuntu 22.04
prompt> error, invalid packet received from waveshell client: raw[which: no mshell-v0.5 in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/stheil/.mshell)]
@oneirocosm
Interesting--I would have expected clearing the known_hosts to at least temporarily make it go away. I'm really hoping it isn't an underlying bug in the library we're using. In the meantime, there are a few other things we could look at.
Clearning the known hosts does make it go away, I typed that sentence then testing it again for sanity's sake (forgot to update the sentence), and it did solve the issue. But it was kinda hit or miss with if it worked or not because the first time it did not fix it, which is very strange to me.
Which keywords are you using for this connection in your ssh_config file? You don't need to tell me anything like user and/or hostname, but it's possible there are more obscure ones that we don't support yet.
Nothing that the 0.6.x version didn't support. I am truly unsure what caused the issue to arise all of the sudden.
After removing the offending lines (one of which was the machine I am attempting to connect to) from the known hosts file it then throws this error. Below are the types of keys that it was angry at.
@stheil15
Same here after an update but different error. Ubuntu 22.04
prompt> error, invalid packet received from waveshell client: raw[which: no mshell-v0.5 in > (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/stheil/.mshell)]
This looks like a separate issue that I've seen in development builds but not in production. You may be able to get around it by explicitly clicking the reinstall button and waiting a few minutes. (We unfortunately don't have a good install indicator when this happens).
@oliv10
Nothing that the 0.6.x version didn't support. I am truly unsure what caused the issue to arise all of the sudden.
We made a bunch of ssh changes in this update. Rather than using a text-based system with the regular ssh
command, we're now using golang's x/crypto/ssh
library. So there's a chance that these updates broke something that worked in the previous version. I imagine things like HashKnownHosts
and FingerprintHash
could cause some problems until more support is added.
Granted, none of that directly fixes your issue. Did you by chance get a popup with the remote host identification has changed
error? Typically that would mean, that waveterm is finding a different entry in ~/.ssh/known_hosts
, ~/.ssh/known_hosts2
, /etc/ssh/known_hosts
, or /etc/ssh/known_hosts2
for that connection, but the credentials from that file don't match what is being received. But I would expect that you'd also see this when connecting with a regular ssh
command as well.
I am getting the remote host identification has changed
error. However, when I ssh into the machine using my standard terminal it works just fine without issue. No other known_hosts
files exist on my system either.
Would you happen to have two entries for the same remote in your known_hosts file but with different keys?
If so, it could be related to this bug https://github.com/golang/go/issues/36126
Would you happen to have two entries for the same remote in your known_hosts file but with different keys?
Not after removing the three keys it was mad about.
After wiping the known_hosts in its entirety and ssh into it using my normal terminal, it creates three known hosts for it using three different key types. So, I don't think that should be an issue anyway.
If it is creating the three known hosts entries, it likely does come from the bug I linked above. It seems like the library we're using can't handle being provided multiple key types. There is a PR to fix it, but it looks like it hasn't been touched in a while. Worst case scenario, we might be able to fork the library and implement the fix ourselves—at least until it gets merged into the original library.
Well, its not. Cause with the known_hosts
file having just those three keys that it generated from ssh into it using the standard terminal. Switching back to Wave with just those created worked perfectly fine.
known_hosts file
Connection alive and happy, sans a few unrelated errors.
Executes commands as it would through any other terminal
Oh good—I'm glad you have a workaround! Still, that means that we aren't writing to known_hosts properly. If you noticed any glaring differences (that don't require you to post your keys) between the known_hosts we produced and the known_hosts ssh
produced, that would be helpful!
Oh good—I'm glad you have a workaround! Still, that means that we aren't writing to known_hosts properly. If you noticed any glaring differences (that don't require you to post your keys) between the known_hosts we produced and the known_hosts
ssh
produced, that would be helpful!
With the known_hosts
empty and trying to connect using wave it wouldn't prompt me to create the new keys at all. So I would say that's probably the first thing to take a look at.
I have the same problems. Ubuntu machines. It seams like there isn't any new line after the key is added to known_hosts. So the first one is ok. When the second is added it just appends to the first one. Manually editing the row and press enter to force a newline makes everything correct again.
I see where the issue is now. And it shouldn't be too hard to fix, so it will be in our next release.
a linux build confirmes that the fix is the solution to the problem. Thx for the quick fix.
While this fixed part of this issue, it seems the initial issue still exists as referenced here https://github.com/golang/go/issues/36126
Since that one is more active, I will close this one and continue to work on a fix there.