Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program to listen on port... 1

Status
Not open for further replies.

w1nn3r

ISP
Sep 12, 2001
179
US
I need a program that would listen on a port, when someone connected, would prompt for a pass, then if the correct pass is given could run a bash script. This will be used on my Redhat or FreeBSD systems. Any help would be appreciated.
 
What kind of client are you going to expect users to use? If you want to allow the use of telnet or ssh type clients, and you want the user to see the output of the bash script, then the easiest solution for a Linux/FreeBSD box is to add a new user to the system, and make the bash script their default shell. If it's a custom client and server that is only going to fire off the script, then you can use the socket interface.
 
Thats a great idea, i shoulda thought of that(Was a monday) but would i be able to set a 2nd telnet daemon up to listen on a unique port?
 
I know there is a way to do it, but I'm not sure how...
Sockets and servers are really easy to write in Java. JAVA is a better language for internet protcols and port listening.

As for running a second telnet deamon, howsa-bout turning on a SSH server as well, one with the script, one without. (you'd probably want to use SSH as your connection and turn telnet into the simple listener).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top