Exit RouterOS ssh

If I am on Linux command line and connect by SSH to Mikrotik RouterOS, what to type if I want to disconnect and return back to Linux? I know to use CTRL+D.

But I have automated commands in PHP on Linux:

exec("sshpass -p 'secretpassword' ssh admin@192.168.1.254");
exec(/* RouterOS command */);
exec(/* I want to return to Linux */); // HOW?
exec(/* Linux localhost command */);

Thnx

quit or /quit