I\'d like a command that ssh\'es into a machine, runs a command (cd or execute a script or su), and then gives me the shell. Passing a command to ssh seems to always exit.>
Put something like this at the end of the script you want to run:
bash -li
That starts Bash as an interactive login shell. It's not perfect, since you'll be missing out on things like TERM
forwarding, but it might be adequate to your needs.
If it isn't sufficient, I'd just make two separate ssh calls, one to run the script and another to log me in.