I am trying to figure out exactly what is sent to an SSH host when I press CTL-C in either putty or open ssh. All I am trying to do is send control codes pragmatically that are equivalent to when a user presses CTL-Z for example. So far every time I send ^C or \cc or \003 it just prints it out. There must be some sort of additional information to let the terminal know it was ^C escaped?
Any help is appreciated. Thank you
Edit: I am pragmatically sending characters to an SSH session that is already connected to an SSH host. I want to see the same effect as when I have openssh client open and I press CTL-C on my keyboard.