I searched everywhere but didn't find a solution.
Basically I downloaded teamviewer both on my pc (macOS) and on the host (ubuntu) (the server which I should connect to). In this server, there are two user accounts. One is mine, and one is not.
If I want to access the computer remotely, I can, but only if I logged into my account in the server. If I logged out, then teamviewer says I can't.
I logged in with the same account on both teamviewers apps. I enabled all the useful settings on the server, like "grant easy access", "allowlist", and "account assignment" but nothing seems to work.
What can I do? I am quite desperate.