LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 04-07-2013, 01:44 PM   #1
Pedrommone
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 04-07-2013, 09:19 PM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,447

Rep: Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204
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.
 
Old 04-08-2013, 02:25 AM   #3
Pedrommone
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-08-2013, 02:47 AM   #4
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,447

Rep: Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204
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.
 
Old 04-08-2013, 02:58 AM   #5
Pedrommone
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-08-2013, 03:10 AM   #6
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,447

Rep: Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204
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.
 
Old 04-08-2013, 04:10 AM   #7
Pedrommone
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Forget about the tunnel thing, the point is: I want deny any user interaction with terminal.

Last edited by Pedrommone; 04-08-2013 at 10:30 AM.
 
Old 04-08-2013, 04:14 PM   #8
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,447

Rep: Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204
Hi,

Quote:
Originally Posted by Pedrommone View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SSH: Connection Refused - Ubuntu 12.04 TechHunter16 Linux - Server 15 07-04-2012 02:42 PM
[SOLVED] ssh port 22: Connection timed out (ubuntu 10.04) drkayak Linux - Networking 3 03-04-2012 10:54 AM
[SOLVED] SSH connection issues on Ubuntu 10.10 I_LG_Ix Linux - Networking 14 12-25-2011 07:36 AM
ssh connection timing out Ubuntu 10.04 kells Ubuntu 6 11-15-2010 07:03 AM
Slow ssh connection over lan with Ubuntu Desktop and Ubuntu Server Recursion Linux - Networking 1 05-23-2009 02:17 AM


All times are GMT -5. The time now is 06:12 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration