> Trying to run this but it isn't working - I'm suspecting it's the quotes:
> $ ssh machine1 "ssh machine2 "mysql -e "show databases"""

That works for me with no quotes whatsoever. I.e.,

   ssh machine1 ssh machine2 mysql -e show database


-Yaron

--