there are two Macs, #2 one logged in with exampleuser and #1 I am logged in as admin.
exampleuser doesn't have SSH rights at all, as it isn't an administrator. admin has full rights and I also know the password for exampleuser.
What I want to do:
I want to open a Program via SSH on exampleusers Mac (#1).
As I tested it I gave exampleuser the rights and connected as exampleuser via SSH - everything worked just fine with "open /Applications/..." (But for security reasons I can't give exampleuser SSH access all the time).
What I did:
I used the admin account to connect to Mac #2 via SSH, but as I started the program, it obviously returned error as it's not the same user. So I tried "su exampleuser" but after that I wasn't really connected as exampleuser but instead I was somehow stuck in a strange bash that I've never seen before so it didn't work either.
So i thought about connecting as admin, then temporarily giving exampleuser ssh rights so as to connect directly, but i didn't find out how to change SSH-settings via SSH.
So how could I do it?