Resolved Telnet client

Discussion in 'iOS Programming' started by DennisBlah, Feb 25, 2015.

  1. DennisBlah, Feb 25, 2015
    Last edited: Mar 5, 2015

    DennisBlah macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #1
    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.
     
  2. DennisBlah, Mar 4, 2015
    Last edited: Mar 4, 2015

    DennisBlah thread starter macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #2
    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]];
    
     
  3. jlw2387 macrumors member

    Joined:
    Nov 13, 2010
    #3
    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.
     
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
  5. DennisBlah thread starter macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #5
    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 ;-)

    Hi Cromulent, that's correct I know about that, I'm working on SSH part now ;-)
     

Share This Page