Chaining Triggers

Skip to first unread message


Oct 18, 2022, 5:29:06 AM10/18/22
to iterm2-discuss

not sure if i am doing something wrong here, but I am trying to chain triggers.

Open Profile -> run command (ssh to remote host): trigger on 'password' -> open password manager : wait for and trigger on prompt -> run command (ssh to new host) : trigger on 'password' -> open password manager

the first trigger is working and end up in the first host, but the second trigger which is looking for the prompt to then run a second ssh doesn't seem to trigger. I've tried both instant and non instant, but still doesn't help... 

have literally just updated, so running the absolute latest


Richard Mitchell

Oct 18, 2022, 7:17:57 AM10/18/22
to iterm2-discuss
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.

Richard Mitchell

Oct 18, 2022, 7:19:27 AM10/18/22
to iterm2-discuss
that should be:

 ProxyCommand ssh Ahost -W %h:%p

(The hyphen wasn't intended in %h)


Oct 18, 2022, 7:29:00 AM10/18/22
to iterm2-discuss
cheers, that could work - unfortunately the only system in this chain i have control over is my own - so keys are out of the question. for cleanliness it would be good to do this in iTerm but Ill give it a shot, might be a good workaround until I can get the triggers working
Reply all
Reply to author
0 new messages