In my work environment, home directories are shared across servers. I often realize that I need to run a script on another server, e.g. due to RAM requirements or other jobs running on the current server. I finally figured out how to log in to the other server while staying in the same directory:
ssh -t server cd `pwd` "&& $SHELL"
(Of course, you can define aliases for different servers.)