Using stock Terminal.app on El Capitan, the effort is to set up a shortcut in a sense, that upon press it would execute a specific command.
Consulting man
pages for bind
command following steps have been taken but yielded no results.
First approach was to place the setting inside ~/.inputrc
file and let the login session do its work. The current state of the file is:
"\C-s": "ssh hostname"
Second, used bind
command directly.
$ bind '"\C-s": "ssh hostname"'
appendix:
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)