Archived Forum Post

Index of archived forum posts


SSH control characters

Jan 31 '13 at 21:28

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:


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];