Subscribe Us

Display Active/Current login session of ftp user in linux

You should set setproctitle_enable to YES in your vsftpd.conf. From man 5 vsftpd.conf:

vsftpd.conf
...
setproctitle_enable=YES
...

If enabled, vsftpd will try and show session status information in the system process listing. In other words, the reported name of the process will change to reflect what a vsftpd session is doing (idle, downloading etc). You probably want to leave this off for security purposes.

Now you can do a ps axuw | grep vsftp (or whatever you like) and see connected users.

[root@RHEL56 ~]# ps axuw | grep  vsftpd |grep -E :\ connected'

nobody 2141  0.0  0.0  46384  1140 ? Ss   11:46   0:00 vsftpd: 192.168.1.56: connected
nobody 2341  0.0  0.0  46384  1140 ? Ss   11:45   0:00 vsftpd: 192.168.1.96: connected
nobody 2541  0.0  0.0  46384  1140 ? Ss   11:48   0:00 vsftpd: 192.168.1.46: connected

Done

Post a Comment

0 Comments