I already have an ssh agent set up, and I can run commands on an external server in Bash script doing stuff like:
ssh blah_server "ls; pwd;"
To match your sample code, you can wrap your commands inside single or double qoutes. For example
ssh blah_server " ls pwd "