I suggest that you investigate what your MATLAB_SHELL and SHELL environment variables are, in case they are set to something unexpected (see the documentation for the unix() command for more information.)
My suspicion is that on the slaves, something in /etc/profile or in your ~/.profile or ~/.bashrc or the like is unconditionally attempting to do an operation on a tty, such as by trying to do
If you have a command like that in your shell startup script, you need to make it conditional upon a ptty existing, such as by testing with
if -t 0
stty erase "^H"
(Note those are at the shell level, not the MATLAB level.)