Occasionally I ssh into my server to check something, and if it needs the gui I use 'ssh -X'. Until recently there was no problem. Exiting simply dropped me back to my local konsole. Lately, though, the shutdown seems to hang, and I have to close the session. Any thoughts?
Anne
Hi,
On Thu, Jul 30, 2009 at 09:42, Anne Wilsoncannewilson@googlemail.com wrote:
Occasionally I ssh into my server to check something, and if it needs the gui I use 'ssh -X'. Until recently there was no problem. Exiting simply dropped me back to my local konsole. Lately, though, the shutdown seems to hang, and I have to close the session. Any thoughts?
This usually happens when you have a background process connected to the tty used by your SSH session.
This usually happens when you restart a daemon ("service xxx restart" or "/etc/init.d/xxx restart") and the script or the program does not detach itself from the tty, which it should do if it is a proper daemon.
You can use "ps -f" (before you close the session) to see which processes are attached to your tty, after that, if you log out the session and it hangs, you can look into those programs that were running on your tty and see if they are causing that.
See also: http://www.openssh.org/faq.html#3.10
If you want to force disconnection of the SSH session without having to close the terminal or window, you can type <Return> then ~. (tilde followed by dot), this will terminate the SSH client process.
HTH, Filipe
On Thursday 30 July 2009 14:54:04 Filipe Brandenburger wrote:
Hi,
On Thu, Jul 30, 2009 at 09:42, Anne Wilsoncannewilson@googlemail.com
wrote:
Occasionally I ssh into my server to check something, and if it needs the gui I use 'ssh -X'. Until recently there was no problem. Exiting simply dropped me back to my local konsole. Lately, though, the shutdown seems to hang, and I have to close the session. Any thoughts?
This usually happens when you have a background process connected to the tty used by your SSH session.
This usually happens when you restart a daemon ("service xxx restart" or "/etc/init.d/xxx restart") and the script or the program does not detach itself from the tty, which it should do if it is a proper daemon.
You can use "ps -f" (before you close the session) to see which processes are attached to your tty, after that, if you log out the session and it hangs, you can look into those programs that were running on your tty and see if they are causing that.
See also: http://www.openssh.org/faq.html#3.10
If you want to force disconnection of the SSH session without having to close the terminal or window, you can type <Return> then ~. (tilde followed by dot), this will terminate the SSH client process.
Very helpful, thanks
Anne
Anne Wilson wrote:
Occasionally I ssh into my server to check something, and if it needs the gui I use 'ssh -X'. Until recently there was no problem. Exiting simply dropped me back to my local konsole. Lately, though, the shutdown seems to hang, and I have to close the session. Any thoughts?
Anne
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hi
This normally happens when you have a service wanting to keep a connection open to a Terminal. Eg to display output from standard out, or standard error. Are you by chance starting any services manually when you see this happen ?
On Friday 31 July 2009 00:35:03 Clint Dilks wrote:
This normally happens when you have a service wanting to keep a connection open to a Terminal. Eg to display output from standard out, or standard error. Are you by chance starting any services manually when you see this happen ?
Not at all. Yesterday, for instance, I simply fired up konqueror to check out a layout question. It was open maybe two minutes, then I shut it down and quit the ssh session - or tried to.
This problem has only occurred recently - maybe for the last 2 weeks. Apart from updates nothing has been changed on the server. I'm not doing anything complex when I ssh in - it's mostly when I simply want to check something that needs root permissions (no, I don't log in as root ;-) - it's not permitted ). For user-level I have permanent mounts to my /home and a data directory.
Anne