-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
I had a x86_64 VPS on a cloud provider, my Rustdesk server instance was running. I had performance issues and migrated to AWS with a arm64 EC2 instance. Both with Debian, not sure about the previous one but the EC2 instance runs Debian 13.
I copied my keypair in order to maintain the connected clients. However, I started getting key mismatch error when trying to connect from one client to another, even though it connects just fine to the server with no error in the logs.
The permissions on id_ed25519 were 644 by default, owned by root. I cd'ed to /var/lib/rustdesk-server and tried running hbbs manually and got the same error. I then proceeded to set permissions as 600. Interestingly enough, if I run with my user, that can't read the secret key, I'm able to use Rustdesk and connect one client to another with no issue. However, if I run as root, key mismatch error appears again.
I tried setting the systemd service to use another user and group, which wouldn't have access to the secret key, however the process seems to keep running as root, therefore key mismatch error.
I thought it could be a systemd issue, but the fact that the error also happens when I run manually with a user that can read the secret key makes it seem unlikely. In this whole process I didn't really touch hbbr.
Logs don't show any trace of error, so I have no idea what to try next besides setting up something sketchy with crontab. Maybe that's an arm64 build issue?
Forgot to add: after setting permissions as 600, I also tried changing ownership of id_ed25519 to a regular user and running it with that same user, also got key mismatch. So everytime the user running hbbs had read access to id_ed25519 I got key mismatch.