login about faq

Or, how to enumerate logged in users to a server?

asked Oct 12 '09 at 14:45

Sami%20Lehtinen's gravatar image

Sami Lehtinen

edited Oct 12 '09 at 15:42

The w, who, users and finger commands help finding out the users who are currently logged in on the machine. However, the commands don't show whether the user logged in via Tectia Server or via some other remote login method. If you know that Tectia Server is the only remote login method to the machine then the w or who gives you the answer.

If there are several remote login mechanisms on the machine or several Tectia Servers running on different ports then the process list needs to be examined to find out the users. To see which users are logged in to Tectia Server one possible way is to use command "ps axuf" and then check the relevant ssh-servant-g3 processes and see which of them have some shell processes as a child process and the first field of the shell process line tells you the username.


answered Oct 20 '09 at 16:56

Sami%20Knuutinen's gravatar image

Sami Knuutinen

I was looking for a way to get the users logged in to the SSH Tectia Server, specifically. The process trick works, if the users has running processes, but doesn't work for tunneling only users, or users with idle connections (broker is keeping the connection open for caching purposes). Your answer is practical, but I'd like to see a complete solution.

(Oct 21 '09 at 08:35) Sami Lehtinen Sami%20Lehtinen's gravatar image

Sending the SIGUSR1 to ssh-server-g3 process dumps the server status to the logs so you can see if the server has any open channels and you can see the number of open connections etc. This way it is possible to see if there are open tunnels or open idle connections. However, still the usernames are not shown so this is not the complete solution.

(Oct 21 '09 at 10:24) Sami Knuutinen Sami%20Knuutinen's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Oct 12 '09 at 14:45

Seen: 12,299 times

Last updated: Dec 01 '09 at 20:07

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.