Skip to content

Menu
  • Home
  • Linux Hosting
  • WordPress
  • PHP
  • cPanel
  • Digital Marketing
  • Linux Reseller Hosting
  • VPS
  • Dedicated Server
  • Tutorials
  • Website Development
  • Client Area
December 24, 2019
HomecPanelHow to Find recent cPanel login sessions via SSH? [EASY GUIDE]☑️

How to Find recent cPanel login sessions via SSH? [EASY GUIDE]☑️

By Ritnesh Rai cPanel, SSH, Tutorials  0 Comments

How to Find recent cPanel login sessions via SSH? [EASY GUIDE]☑️

Today in this tutorial you will about how to find recent cPanel login sessions via SSH.But before getting started let us quick watch this short video on how to find recent cPanel login sessions via SSH.

The following command will search /usr/local/cpanel/logs/session_log and output the last three dates upon which the cPanel account was accessed:

grep $USERNAME /usr/local/cpanel/logs/session_log | grep NEW | awk '{print $1}' | uniq | tail -n3

(Ensure you replace $USERNAME with the username of the cPanel account to search. )

To search the recent cPanel session activity for all cPanel users on the server, execute the following command:

for user in $(whmapi1 listaccts | awk '/user:/ {print $2}'); do echo "The user $user last logged in on these dates:" ; grep $user /usr/local/cpanel/logs/session_log | grep NEW | awk '{print $1}' | uniq | tail -n3 ; done

That’s it!!!

For more information, kindly follow us on social media like Twitter and Facebook and for video tutorials, subscribe to our YouTube channel –https://youtube.com/redserverhost.com

Facebook Page- https://facebook.com/redserverhost

Twitter Page- https://twitter.com/redserverhost.com

If you have any query, feel free to let us know via the comments section below.

Thanks for Reading!!!

Tags: cheap linux hosting, buy linux hosting, cheap reseller hosting, buy reseller hosting, best reseller hosting, cheap web hosting, cheapest web hosting, cheapest reseller hosting,  cheap reseller host, cheap linux host, cheapest linux hosting, best linux hosting, best web hosting

Tags:how to find cPanel login sessions via PuTTy, how to find cPanel login sessions via SSH, How to Find recent cPanel login sessions via SSH, RECENT CPANEL LOGIN SESSIONS

Related Posts

How to move files from one host to another host in cpanel? UPDATED – 2022

Configure General Settings

How to Configure WordPress General Settings?

How To Change Default Index Page in .htaccess from cPanel

How To Change Default Index Page in .htaccess from cPanel?

Search

Our Recent Posts

  • How to Create Posts or Pages using Elementor?
  • How to Create Templates with Elementor (free version)?
  • How to Install Elementor for your WordPress website?
  • How to Change Category Base prefix in WordPress?
  • How to Manage Exim Mail Queue?

Categories

Search

Red Server Host Copyright © 2022.
Powered by Skillvent Technologies Pvt. Ltd. . Back to Top ↑