iTerm2 does allow to set a keyboard shortcut to create a tab with a specific profile. However, I never remember the key combination for this. Instead, I decided to add an extension in Alfred that will do the same thing.
The code for the extension is as follows:
tell application "iTerm"
set myterm to (current terminal)
set mysession to (launch session "server")
set name to q
set myVar to "ssh " & q
write text myVar
I have the extension triggered on keyword
rt. This allows Alfred commands such as
rt server_name. Where the
server_name is an alias in my SSH config. This will create a new tab using the
server profile and ssh to the server.
The following links were extremely helpful during the creation of the extension.