I'd like to send commands from one terminal and have them run on
another.

I'm accessing my pc through ssh on /dev/pts/0 and /dev/pts/1.

I am able to write from one terminal to another, e.g., on pts 0
#echo 'Hi There'>/dev/pts/1
"Hi There" then appears on pts1.

I want to be able to do something like
echo 'progname'>/dev/pts/1
and have progname submitted through the shell on pts1.

Is there any way of doing this in Linux using shell commands?