Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7783777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:56:20+00:00 2026-06-01T19:56:20+00:00

I am connecting to a telnet listener. Telnet server sends 1234 for every second.

  • 0

I am connecting to a telnet listener. Telnet server sends “1234” for every second. I want to read the message “1234” and close the telnet session. Here below is my code but it does not work.

#!/bin/bash
telnet 192.168.10.24 1234
read $RESPONSE
echo "Response is"$RESPONSE
echo "quit"

How can i automatically read the telnet message?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:56:22+00:00Added an answer on June 1, 2026 at 7:56 pm

    You could use internal TCP mechanism:

    #!/bin/bash
    
    exec 3<>/dev/tcp/127.0.0.1/80
    # echo -en "eventualy send something to the server\n" >&3
    RESPONSE="`cat <&3`"
    echo "Response is: $RESPONSE"
    

    Or you could use nc (netcat), but please don’t use telnet!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am connecting to my mail server using IMAP and Telnet. Once I am
When connecting to sql server, I have the hardcoded string (local). Is this a
When connecting to a Sql Server you can include either App or Application Name
I'm connecting to a database server (MSSS 2005, 9.0 SP2) which is almost totally
PLEASE READ THE UPDATE #2 BELOW IF YOU ARE INTERESTED IN THIS PROBLEM ;)
I've made a tcp server witch spawns a process to listen incoming connections. Here
I have a listener that returns a TcpClient that must read data until the
My goal is to create telnet clients as endpoints per the TCP4ClientEndpoint implementation. Here's
Is it possible to connect to an SSH server through a Telnet connection? I
I am trying to make a script, which connects to a server by telnet.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.