Results 1 to 8 of 8

Thread: System thinks I'm still logged in via ssh

  1. #1

    Default System thinks I'm still logged in via ssh

    Hi

    Some time ago I logged in from my laptop to my stationary via ssh. During this I had to hard reboot the stationary because of a total freeze of the system. Ever since the stationary system believes that there still is a live ssh session from the laptop. This shows every time I shuts down the stationary and a indicates with a note asking if I want to kill the, ssh, session. Every time I press ok and still the next time I have to answer the same question again.

    How can I get rid of the stale session? I have logged in (and loogged out) via ssh several times from the laptop after the freeze.

    I'm on openSUSE 11.1.

    /Anders

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,977

    Default Re: System thinks I'm still logged in via ssh

    Quote Originally Posted by falolaf View Post
    Hi

    Some time ago I logged in from my laptop to my stationary via ssh. During this I had to hard reboot the stationary because of a total freeze of the system. Ever since the stationary system believes that there still is a live ssh session from the laptop. This shows every time I shuts down the stationary and a indicates with a note asking if I want to kill the, ssh, session. Every time I press ok and still the next time I have to answer the same question again.

    How can I get rid of the stale session? I have logged in (and loogged out) via ssh several times from the laptop after the freeze.

    I'm on openSUSE 11.1.

    /Anders
    Look with
    Code:
    ps -ef | grep ssh
    if there is a process that could be involved with that session and kill it.

    Hope this helps.
    Henk van Velden

  3. #3

    Default Re: System thinks I'm still logged in via ssh

    Quote Originally Posted by hcvv View Post
    Look with
    Code:
    ps -ef | grep ssh
    if there is a process that could be involved with that session and kill it.

    Hope this helps.
    So you say that the process can percist a reboot or even a shutdown?

    If I was unclear before: Every time I shutdown my computer I have to force logout of a ssh session that really isn't there anymore. I answer ok on the question and the computer is turned off. Next time the computer is on and I want to shutdown: same story again.

    /Anders

  4. #4

    Default Re: System thinks I'm still logged in via ssh

    I can also add that I tried to delete the user with userdel but I get this:
    userdel: account `anders' is currently in use.

    I event tried in runlevel 1 with the same result.

    So where do I look for a user that the system thinks is still logged in?

    /Anders

  5. #5
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: System thinks I'm still logged in via ssh

    Something is really wrong. SSH session can not be kept across reboots. Remove all you network cables, reboot the system and see if you have any ssh connection process or not.
    Also, the session can't be there if your laptop is switched off.

    If you see a session with your network cable connected, it could be from a hacker outside. Use the netstat command to see from which IP address the connection is established.

  6. #6
    Join Date
    Dec 2008
    Location
    Hamburg
    Posts
    458

    Default Re: System thinks I'm still logged in via ssh

    Hi,

    Quote Originally Posted by falolaf View Post
    I can also add that I tried to delete the user with userdel but I get this:
    userdel: account `anders' is currently in use.

    I event tried in runlevel 1 with the same result.

    So where do I look for a user that the system thinks is still logged in?

    /Anders
    Perhaps the user is still in /var/run/utmp where the logged in users are kept. A bit hard but maybe it helps: Create an empty file with that name and overwrite the original file. After that log out and in and have a look if the problem still persists.

    hth

    Bye

    Erik

  7. #7

    Default Re: System thinks I'm still logged in via ssh

    Quote Originally Posted by erikro View Post
    Hi,
    Perhaps the user is still in /var/run/utmp where the logged in users are kept. A bit hard but maybe it helps: Create an empty file with that name and overwrite the original file. After that log out and in and have a look if the problem still persists.

    hth

    Bye

    Erik
    This seems to have made the trick! Thanks!

    /Anders

  8. #8
    Join Date
    Dec 2008
    Location
    Hamburg
    Posts
    458

    Default Re: System thinks I'm still logged in via ssh

    You're welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •