LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How 'freeze' SSH connection on Ubuntu 11? (https://www.linuxquestions.org/questions/linux-security-4/how-freeze-ssh-connection-on-ubuntu-11-a-4175457255/)

Pedrommone 04-07-2013 01:44 PM

How 'freeze' SSH connection on Ubuntu 11?
 
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.

evo2 04-07-2013 09:19 PM

Hi,

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..

Evo2.

Pedrommone 04-08-2013 02:25 AM

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

evo2 04-08-2013 02:47 AM

Hi,

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 .

Evo2.

Pedrommone 04-08-2013 02:58 AM

The runnels are made by ssh, when someone connect into my server terminal. The terminal need be open to keep tunnel connected.

The bash I mean run for every user, so its on right place

evo2 04-08-2013 03:10 AM

Hi,

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.

Evo2.

Pedrommone 04-08-2013 04:10 AM

Forget about the tunnel thing, the point is: I want deny any user interaction with terminal.

evo2 04-08-2013 04:14 PM

Hi,

Quote:

Originally Posted by Pedrommone (Post 4927402)
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

"stop user getting shell"

Evo2.


All times are GMT -5. The time now is 09:43 AM.