How to get list of SSH users that are connected to server
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to get list of SSH users that are connected to server
My system is SUSE 11.1
I want to see who is connected via SSH. For instance, I have users connected using FileZilla. I can see in th e/etc/var/messages that they authenticated/connected, but I can't see if they have since disconnected or not.
Also, about 3 years ago I used to use Fedora for my SSH and in the sshd_config I'd make custom logs for each account, specify which user accounts were possible, port number, etc, etc. Is this possible to do using the SUSE linux? Any links on how to do this on suse? I haven't used linux in 3 years and can't find my old sshd_config files to take a glance...I did look at the sshd_config on SUSE, but it looks very different.
In linux "w" will help you to display the users who are connected to the system, sorry i dont know whether this command exist on Suse
thanks, the command exists, but ufortunately it does not show users connected via SSH. i think it is because they are authenticated using PAM??? using w, who, etc, does not show who is logged in when i use winscp or filezilla. if i use putty it does, but, i assume, that's because i'm connecting as if it were a terminal??
i really don't know why, but i do know using 'w' when connected via winscp and filezilla does not show the user as being connected.
besides, i'd like to not only see user sessions, but also see file activity as well..ya know, a real SSH log like i used have on fedora. maybe suse doesn't do this?
"w" print the ssh users but you are expecting ftp users activities right?
what FTP server you are using?
Are you confusing with ssh user and ftp user?
i don't think so. when i use filezilla/winscp i'm connecting on port 22. also, my /var/log/messages says the process is SSHD[#] and ssh2 (version?). ssh is the same as sftp, right?
Yess ssh version2, sftp assumes that it is run over a secure channel, such as SSH, that the server has already authenticated the client. you can logging the details in a logfile, check manpage for sftp there some options -o, -v and further just refer the following google search
Not exactly what you are looking for but netstat would provide you active connections to the server look for connections on port 22, won't give you the users but will tell you how many are connencted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.