Verifying remote command status

hello Friends,
I wanted to verify status of remote command executed on remote machine in hpux.
remsh <hostname> -l root cd /sampldir

i wanted to check weather the command executed on remote machine correctly or not by $?.
Can you tell me how to execute multiple command on remote machine.

Thanks & Regards
Ravikiran.