problem with sshpass

Hello

i am using sshpass to pass remote password into script

but phase some problems when try to execute some commands remotely
which means that the remote env not passed through sshpass

for example

sshpass -p 'XXX' ssh -o StrictHostKeyChecking=no -l myserver myserver visu_fis_pnes

ksh: visu_fis_pnes:  not found.

even i add . ./profile , or execute the full path for the command
also tried to add "" and '' but not working too

my question is how to execute the remote profile automatically ? as if i connect with normal ssh ?

may be there is some options for ssh command to add ?

thanks to help

You are aware that using sshpass means everyone on the system can see the password?

Try creating ssh keys and using ssh, you'll no longer need to kludge plaintext passwords into your script in an insecure manner. Google 'passwordless ssh'.

hello

yes you right its not safe but this is the allowed option now to me due to company rules

thanks if you help