Run Script as different User

Hello everyone,
Is it possible to give a script a user with whom it then runs?

I set up SSH with Keys to not need a password for ssh-exec.
In addition, I equipped a local user with the Priv key (I log in via Radius) and, logged in as this user, everything works great on the shell too.

But if I now write a script with which the user is logged in via Radius, the SSH login via the scripts no longer works :frowning:

What can I do here?

Did you find any solutions for this?

I have the same need/problem.

Which problem?

SSH in a script?

SSH is in itself interactive, you need ssh-exec for use in scripts:
https://help.mikrotik.com/docs/spaces/ROS/pages/132350014/SSH

but if you don’t ask the exact question you need an answer to, it is improbable that anyone can provide the appropriate answer.

Make a schedule with owner set to user that can execute ssh without password