Send Command By Telnet

Welcome Forums General PowerShell Q&A Send Command By Telnet

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
1 year ago.

  • Author
    Posts
  • #84923

    Participant
    Points: -37
    Rank: Member

    Hi Guys,

    I need to check a service running at specific port by telnet. The test will send a cod and according the answer we know if service is OK. Let me show a example:

    telnet 1.1.1.1 6802

    After this we need send a command, like S1, SR001...If return 0, mean is OK, if not, we have an error.

    Anyone have an idea how we did this?

    Thank you for advance.

    rc.

  • #84925

    Keymaster
    Points: 1,673
    Helping HandTeam Member
    Rank: Community Hero

    You could do it exactly like that, actually. No different than a batch file. Or just use a batch file if that's what gets the job done!

  • #84932

    Participant
    Points: -37
    Rank: Member

    Thank you Mr. Jones,

    I use the netcap to execute the command. See my simple command line inside a linux RHEL.

    echo 'COMMAND' | nc 1.1.1.1 1234 > Result.txt

    I Just install de nc and run it.... simple...

    Thanks.

    Att;

    rc.

The topic ‘Send Command By Telnet’ is closed to new replies.