Most likely the user user on the machine system has not properly setup their ROS environment. Even if you have sourced the appropriate setup.bash files in your local terminal, once you are ssh'ed into a remote machine, the environment on that system does not inherit anything from the launching terminal. Try ssh'ing into the machine, then sourcing the appropriate setup.bash file, and then run roscore.