Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I'm new at linux, and I'm trying to run a SSH-tunneling server for MySQL tunneling. When someone connects to my shell the user can do nothing, just see the information on my shell produced from a bash script. The problem is that I dont know how to 'freeze' the Terminal. Thank you.
sorry I'd be surprised if anyone can help you here without more information. Please tell us exactly what you are doing and what the problem is.
Eg.
- What ssh command are you running for the tunnel?
- What do you mean by "someone conneects to my shell"?
- What do you mean by "'freeze' the Terminal"? (and is the captialization of "Terminal" supposed to signify something?)
- What is this bash script you refer to?
- Etc..
Theres is no command for the tunnel, its being produced by ssh,
When someone login into terminal witb his own credential
When someone connect into terminal, he can just ser my bash script displaying some Information, cant interact or press ctrl c for exitig the script
I refer to my own bash script located at profile.d
sorry, I still can't help you if you don't provide any specific information.
For example, exactly what ssh command is being issued? Tunnels can be made using ssh in a number of different ways. Eg "reverse" ssh -R, "forward" ssh -L, or socks with ssh -D or perhaps ssh -W.
Exactly how do uses "connect into terminal"? Are they sitting at the console? Are they using ssh?
What do you mean by
Code:
I refer to my own bash script located at profile.d
?
if you are talking about /etc/profile.d/, then this is the wrong place to put private scripts. Instead you can put them somewhere in your home directory and source or run them from ~/.profile .
if these are standard ssh connections, then they are not by any conventional sense "tunnels". I still don't know what you mean by "server terminal", but perhaps it isn't relevant.
So, I'm now guessing that there is a bug in the script you put in /etc/profile.d/. Have you tried debugging it? Or if you want help you could post it here so we can look at it.
Forget about the tunnel thing, the point is: I want deny any user interaction with terminal.
Excellent, now you've stated what your problem is. There are a number of different ways to restrict user access to the system. Putting custom scripts in /etc/profile.d is probably not the best approach. I don't have any solutions off the top of my head (although it is trivial to stop ssh logins or _all_ logins for specific users), but putting the following into your favourite search engine should yield results
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.