ssh -f sim@host "cd somedirectory; myprog -a parameter"