Find the answer to your Linux question:
Results 1 to 2 of 2
Hey guys, I'm working on setting up a wargame server & want users to be able to telnet to the server at a certain port, view a custom banner, then ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! Prioria's Avatar
    Join Date
    Sep 2010
    Location
    Gainesville, FL
    Posts
    31

    Want to end Telnet session after displaying banner


    Hey guys,

    I'm working on setting up a wargame server & want users to be able to telnet to the server at a certain port, view a custom banner, then be instantly disconnected.

    I've installed & configured inetd w/ my banner but can't think of a way to disconnect from the session before the login prompt.

    Any ideas?

    Thanks
    ~Ryan

  2. #2
    Just Joined! Prioria's Avatar
    Join Date
    Sep 2010
    Location
    Gainesville, FL
    Posts
    31
    Never mind, I got it. For reference, here's what I did:

    I got rid of telnet entirely and created a bash script with the following:

    #!/bin/bash

    while [ 1 ]; do
    cat /etc/issue.net | netcat -l 6666
    done


    This way, when someone attempts to telnet to port 6666, the contents of /etc/issue.net will be displayed then the session is instantly closed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •