-
Open Keychain Access.app and create new object using the host as a name (“example.com”), username with sudo rights (“user”) and it’s password.
-
Add a trigger for iTerm’s profile (‘Advanced‘ tab):
-
Regular Expression:
\$ sudo
-
Action: Run Coprocess…
-
Parameters:
/path/to/iterm_reply_with_keychain.rb [email protected]
-