How do you bind a key sequence to shell command?
Add a newline character to the end, for example:

bind '"\C-s": "ssh hostname\n"'


Another thing is what key sequence you want to bind the command to, and if it's not already handled by the system. For example, for F12, which is available, you'd use:

bind '"\e[24~": "ssh hostname\n"'