LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 09-20-2018, 12:30 AM   #1
Routerino
LQ Newbie
 
Registered: Sep 2018
Posts: 1

Rep: Reputation: Disabled
Providing a jailed TCP shell for simple control


Hi, I'm looking for some advice about setting up a simple TCP server to act as a control interface on Linux (Ubuntu server 18.04). Obviously SSH is the preferred alternative, but this is meant to provide a simple interface that control systems (keypads, crestron systems, etc.) can connect to. Many of them can't handle SSH.

Since this is an insecure option I would like it to be extremely restricted. Ideally the terminal should only have access to a set number of commands, probably defined by a shell script. IE: I connect to the port, send "start service X", and have the shell script validate and send back "X service started" while keeping the connection open. Ideally there should also be the ability to force a login every time someone connects. Preferably that should also be tied to linux logins, so changing a user password also changes the password to access this portal.

Any idea where to look? I've been looking into socat and netcat options, most of the time though it's already providing a pre-logged-in tty. I'd like it to open the port and then prompt for login and stay within a defined shell script. Breaking out of the shell script should close the session.

EDIT: I've just decided to use socat with a shell script and have the shell script authenticate. It's better to keep the API authentication separate to the user account anyway, since it is transmitted insecurely.

Last edited by Routerino; 09-20-2018 at 10:01 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Git cURL in jailed shell unable to initialize NSS database Thomas. Linux - Software 3 05-07-2019 07:44 AM
GIT install for jailed shell user? I_AM Linux - Server 0 02-09-2011 06:27 PM
Select YeAH-TCP like default TCP congestion control algorithm simonbcn Linux - Networking 0 01-20-2011 10:34 AM
tcp congestion control jwstric2 Linux - Networking 8 04-19-2005 11:28 AM
security tips for providing shell access with debian 3.0 stable? salami Linux - Security 2 08-18-2003 10:39 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration