I don't about triggers, but ssh can automatically connect thru multiple hosts by using ~/.ssh/config
For example:
Host Ahost
Hostname AFQN
User AUser
Host Bhost
Hostname BFQN
User. BUser
ProxyCommand ssh Ahost -W -%h:%p
ssh BHost
This will automatically get to BHost via Ahost. In the above, Host is your short name, Hostname can either be the proper name or the IP.
If you also have a Chost, you can chain thru Bhost the same way. ( A -> B -> C if your topology is setup that way )
If you also setup SSH keys, you won't even have to enter any passwords.