Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Hi all,

I tried following some telnet tutorials. But.. I can't get it to work right.
Does anyone have a decent tutorial or simple sample project for me?

I would really like to make a telnet or ssh client for Cisco management with handy tools for port-security and stuff.

Thanks!
--------------
By only sending an " " without enter or anything, it just gives out the next page of results. \r only gives an new line of the list.
 
Last edited:

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
I found an tutorial about input and output streaming with NSStream.
Its working great!

I'm making an telnet client with gui for cisco management.
Now I'm sending commands by appending \n to the 'string' to send.

Also when I'm requesting a big list from a cisco switch, like sh ru or show port-security it's always like --More--
On a normal terminal session you can press space or any other key to get more from this list.

When I send an enter or w.e it'll just stop requesting the list and send is as an command.

A \r only gives me a new line, and not a whole new 'batch'

Code:
    NSData *data = [[NSData alloc] initWithData:[command dataUsingEncoding:NSASCIIStringEncoding]];
    [outputStream write:[data bytes] maxLength:[data length]];
 
Last edited:

jlw2387

macrumors member
Nov 13, 2010
64
0
Not trying to stop you from programming, but have you tried the Prompt app? It's an insanely good and good-looking SSH/Telnet client.
 

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Not trying to stop you from programming, but have you tried the Prompt app? It's an insanely good and good-looking SSH/Telnet client.

I know, but it does not do what I want.. I'm using my app for managing our cisco switches. Generating reports and list of shutted ports due port-security etc etc, unlocking them by just pressing the port number, configure vlan's etc etc.
I don't believe there is any iOS app that does that ;-)

Just remember that telnet is not an encrypted protocol so anyone can sniff the network traffic (including any passwords sent).

http://forums.udacity.com/questions/100029244/is-telnet-safe
Hi Cromulent, that's correct I know about that, I'm working on SSH part now ;-)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.