telnet in script.

From: Loris Serena (Loris.Serena_at_esat.com)
Date: 07/30/04

  • Next message: Loris Serena: "SUMMARY: telnet in script."
    To: "'sunmanagers@sunmanagers.org'" <sunmanagers@sunmanagers.org>
    Date: Fri, 30 Jul 2004 15:57:42 +0100
    
    

    Sunmanagers,

    I'm trying to put together a little script to test TCP connectivity to a
    remote host on a specific port.

    >From the command line, that would be something like:
    $ telnet 10.11.12.13 4567
    Trying 10.11.12.13...
    Connected to 10.11.12.13.
    Escape character is '^]'.
    ^]
    telnet> quit
    Connection to 10.11.12.13 closed.
    $ echo $?
    0
    $

    But how do I put this into a script?

    Thanks in advance

    Loris

    Esat Telecommunications Limited
    is a wholly owned subsidiary of BT Group plc
    Registered in Ireland, Registration No. 141524
    Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland

    This electronic message contains information (and may contain files) from
    Esat Telecommunications Limited which may be privileged or confidential. The
    information is intended to be for the sole use of the individual(s) or
    entity named above. If you are not the intended recipient be aware that any
    disclosure, copying, distribution or use of the contents of this information
    and or files is prohibited. If you have received this electronic message in
    error, please notify us by telephone or email (to the numbers or address
    above) immediately. http://www.esatbt.com
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Loris Serena: "SUMMARY: telnet in script."

    Relevant Pages

    • Re: Serial comm program
      ... > to a router console via a serial port. ... (Serial connectivity and network connectivity are different ... Have your .bash_profile always start 'script'. ... either through minicom config or directly on the ...
      (Debian-User)
    • Re: network connectivity to mqs
      ... connect from it with telnet to ip1, ... Since ECBOSS only can handle single transaction, ... problem with java we left java program and just tried to check mq- ... So under oss environment there is no connectivity for some reason, ...
      (comp.sys.tandem)
    • Re: cant ping external website
      ... Try 'telnet 132.230.200.200 53' and see what ... connectivity is good to the internet. ... But it also means that the DNS settings are wrong. ... Port 53 is the DNS port so you SHOULD get connected to it. ...
      (Ubuntu)
    • Re: Send/recieve Problem
      ... blank and nothing is on the telnet screen. ... connectivity and still just a blank screen in command prompt. ... Exchange server. ... If that fails you have a problem with ISA ...
      (microsoft.public.exchange.admin)
    • exceed to Red Hat V3 fails after exceed upgrade
      ... server Hummingbird Connectivity 2008. ... telnet and X connectivity, ... I have AIX boxes and telnet and X works fine. ... Hummingbird Exceed xstart parameters to ...
      (RedHat)