This question already has an answer here:
I Need to ssh to a server then switch user and change the directory and then run a command. Now am doing
ssh -t username@hostname "sudo su - otheruser && cd /path/to/directory && command". But this is not changing the directory it just switched the user and ran the command.