I am making a script for my parents on their Mac's so that they can SSH into my Linux computer, and send commands, create popups etc.
This is one of my commands:
sshpass -p Password ssh maliciouzzhd@10.0.0.1 export DISPLAY=:0 & mate-session-save --force-logout
My problem is that the Mac treats the "&" as not in the sshpass script, and executes the argument after using the Mac terminal, no SSH.
So
sshpass -p Password ssh maliciouzzhd@10.0.0.1 export DISPLAY=:0 & mate-session-save --force-logout
would execute
export DISPLAY=:0
in the SSH session, but
mate-session-save --force-logout
would be executed in the Mac terminal.
If anyone could help me out with this, it would be greatly appreciated.