Unix Technical Forum

Re: ttys not being released when using ssh

This is a discussion on Re: ttys not being released when using ssh within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Dominian wrote: > Well, I'm out of answers and finally decided to turn to the newsgroups for > answers. ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 01:03 PM
richard
 
Posts: n/a
Default Re: ttys not being released when using ssh

Dominian wrote:
> Well, I'm out of answers and finally decided to turn to the newsgroups for
> answers. It seems that my server will randomly stop accepting SSH sessions
> and it seems the problem is due to the fact that ssh isn't releasing ttys
> when someone disconnects.. this of course, after a while, starts refusing
> connections to the server. With all this happening the rest of the server
> stops responding to network requests. i.e.: Web/ftp/email.
>
> Anyone EVER see this happen before and have any ideas what th eissue is?


I have never seen this before. It almost sounds like a Denial of Service
Attack. Is your sshd connection open to the Internet?

Have you looked in any of the log files? To get more output make sure
sshd is run with the -d switch. It should then put a log file in
/var/log/sshd.log

Richard
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 01:03 PM
Vitaliy
 
Posts: n/a
Default Re: ttys not being released when using ssh

On 2005-11-27, richard <c@dog.bird.eu> wrote:
> Dominian wrote:
>> Well, I'm out of answers and finally decided to turn to the newsgroups for
>> answers. It seems that my server will randomly stop accepting SSH sessions
>> and it seems the problem is due to the fact that ssh isn't releasing ttys
>> when someone disconnects.. this of course, after a while, starts refusing
>> connections to the server. With all this happening the rest of the server
>> stops responding to network requests. i.e.: Web/ftp/email.
>>
>> Anyone EVER see this happen before and have any ideas what th eissue is?

>
> I have never seen this before. It almost sounds like a Denial of Service
> Attack. Is your sshd connection open to the Internet?
>
> Have you looked in any of the log files? To get more output make sure
> sshd is run with the -d switch. It should then put a log file in
> /var/log/sshd.log
>
> Richard


It's not DoS, rather exactly what Dominian says, SSH doesn't release the
ttys on 10.2. Same thing happens if you shut down a 10.2 machine remotly
over SSH, the client's terminal just freezes.

Not sure where to send the bug reports.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 01:03 PM
Ralph Alvy
 
Posts: n/a
Default Re: ttys not being released when using ssh

Vitaliy wrote:

> On 2005-11-27, richard <c@dog.bird.eu> wrote:
>> Dominian wrote:
>>> Well, I'm out of answers and finally decided to turn to the newsgroups
>>> for
>>> answers. It seems that my server will randomly stop accepting SSH
>>> sessions and it seems the problem is due to the fact that ssh isn't
>>> releasing ttys when someone disconnects.. this of course, after a while,
>>> starts refusing
>>> connections to the server. With all this happening the rest of the
>>> server
>>> stops responding to network requests. i.e.: Web/ftp/email.
>>>
>>> Anyone EVER see this happen before and have any ideas what th eissue is?

>>
>> I have never seen this before. It almost sounds like a Denial of Service
>> Attack. Is your sshd connection open to the Internet?
>>
>> Have you looked in any of the log files? To get more output make sure
>> sshd is run with the -d switch. It should then put a log file in
>> /var/log/sshd.log
>>
>> Richard

>
> It's not DoS, rather exactly what Dominian says, SSH doesn't release the
> ttys on 10.2. Same thing happens if you shut down a 10.2 machine remotly
> over SSH, the client's terminal just freezes.
>
> Not sure where to send the bug reports.


Why not direct them to support@slackware.com?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 01:03 PM
richard
 
Posts: n/a
Default Re: ttys not being released when using ssh

Vitaliy wrote:
> It's not DoS, rather exactly what Dominian says, SSH doesn't release the
> ttys on 10.2. Same thing happens if you shut down a 10.2 machine remotly
> over SSH, the client's terminal just freezes.
>
> Not sure where to send the bug reports.


Twas only guessing. The machine I connect to by ssh is a 10.2 box and
does not have this problem. Exactly how many ssh connections are we
talking about. If I type ps ax I don't see any dead connections.

1515 ? Ss 0:00 sshd: richard [priv]
1518 ? R 0:00 sshd: richard@pts/1
1519 pts/1 Ss 0:00 -bash
1531 pts/1 R+ 0:00 ps ax

$ uptime
16:55:33 up 12 days, 1:24, 1 user, load average: 0.10, 0.03, 0.01

I don't actually admin the machine.

There must be some reason it doesn't happen to me but happens to you guys.

Richard
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 01:03 PM
Grant
 
Posts: n/a
Default Re: ttys not being released when using ssh

On Sun, 27 Nov 2005 01:53:10 GMT, Vitaliy <nabis@bogus.com> wrote:

>It's not DoS, rather exactly what Dominian says, SSH doesn't release the
>ttys on 10.2. Same thing happens if you shut down a 10.2 machine remotly
>over SSH, the client's terminal just freezes.


I spend most of my time talking to linux boxen here via ssh, not have
an issue with ssh. Please document a test case so others can duplicate
problem.

The shutdown issue is known, something new in /etc/rc.d/?? for wireless
networking. I reboot/halt test boxen often, need to be quick to issue
Ctrl-D before target ssh daemon dies )

Grant.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 01:03 PM
Robby Workman
 
Posts: n/a
Default Re: ttys not being released when using ssh

Grant wrote:
> On Sun, 27 Nov 2005 01:53:10 GMT, Vitaliy <nabis@bogus.com> wrote:
>
>
>>It's not DoS, rather exactly what Dominian says, SSH doesn't release the
>>ttys on 10.2. Same thing happens if you shut down a 10.2 machine remotly
>>over SSH, the client's terminal just freezes.

>
>
> I spend most of my time talking to linux boxen here via ssh, not have
> an issue with ssh. Please document a test case so others can duplicate
> problem.
>
> The shutdown issue is known, something new in /etc/rc.d/?? for wireless
> networking. I reboot/halt test boxen often, need to be quick to issue
> Ctrl-D before target ssh daemon dies )
>
> Grant.



This may not be the *best* solution, but I added this:

# Stop the sshd server
if [ -x /etc/rc.d/rc.sshd ]; then
/etc/rc.d/rc.sshd stop
fi

to /etc/rc.d/rc.0 after the apache lines

This kills all active connections to ssh on shutdown/reboot and
prevents the remote terminal from hanging.

RW

--

http://rlworkman.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 01:03 PM
Grant
 
Posts: n/a
Default Re: ttys not being released when using ssh

On Sun, 27 Nov 2005 09:10:01 -0600, Robby Workman <aols@rlworkman.net> wrote:

>This may not be the *best* solution, but I added this:
>

Hmm, *best* is a value judgment, slackware is about "good enough"
to get the task done, whatever that task may be. Keepin' it simple.

Grant.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com