LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-30-2007, 08:25 PM   #1
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
ssh is not closing cleanly


if i ssh to my machine from somwhere elce then everything is fine untill i

give the exit command,

normally this should return me to the local shell but for some reason i get the logout, text but the local shell never returns and the Xterm just hangs.

if i ssh to the remote machine and then ssh back to my machine everything works fine
 
Old 11-30-2007, 09:14 PM   #2
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
what does it say on the server logs when you log out? Is there anything interesting in your local logs during this time? Can you CTRL-C to kill it?

You could experiment with screen. It is actually really useful for ssh sessions because it allows you to have multiple "terminals" from one ssh session. You can also detach your session and then reattach it later. This is especially useful, for instance, if your connection gets killed unexpectedly. With screen, you can reattach the session on any machine. With screen it is also easy to kill "terminals" when they hang and not have to kill your ssh session.
 
Old 12-03-2007, 10:23 AM   #3
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by shadowsnipes View Post
what does it say on the server logs when you log out? Is there anything interesting in your local logs during this time? Can you CTRL-C to kill it?

You could experiment with screen. It is actually really useful for ssh sessions because it allows you to have multiple "terminals" from one ssh session. You can also detach your session and then reattach it later. This is especially useful, for instance, if your connection gets killed unexpectedly. With screen, you can reattach the session on any machine. With screen it is also easy to kill "terminals" when they hang and not have to kill your ssh session.
will have a look at the logs when im back on site to acsess the remote machines im sshing from...

no ctrl+c wont kill it, neither will ctrl+d

but SIGTERM seems to kill it without having to resort to SIGKILL


i use screen all the time,
the screen session will detach cleanly, putting me back at the bash prompt,
trying to exit that to close the ssh connection gives me the same problems as before though!
 
  


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
how to keep program running after closing ssh session fakie_flip Linux - Software 10 11-03-2011 08:33 AM
Connection to SSH closing immediately scratched Linux - General 8 03-25-2007 11:49 PM
DB disconnets after closing SSH clinet nehalv Linux - Software 2 01-19-2007 12:17 AM
DB disconnets after closing SSH clinet nehalv Linux - General 2 01-19-2007 12:15 AM
closing ssh port einstien Linux - Security 32 06-29-2005 09:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:45 AM.

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