Question:
How do I send control characters like CTRL-Z ? I tried sending \u001a in channelSendString and channelSendData, but that does not seem to work..
I didn't know the answer, so I Googled around a bit...
See these links:
http://www.techrepublic.com/blog/security/how-to-escape-ssh-sessions-without-ending-them/4507
http://lonesysadmin.net/2011/11/08/ssh-escape-sequences-aka-kill-dead-ssh-sessions/
Thanks.. I figured it out.. I used ChannelSendData and sent the hex character for CTRL-Z
char bytes[1] = {'\x1a'};
NSData *data = [NSData dataWithBytes:bytes length:1];
[ssh ChannelSendData:[NSNumber numberWithInt: channelNum] data:data];