Security Error: No valid session key – csf

When trying to access the csf plugin for DirectAdmin or cPanel you might get a message like:

Security Error: No valid session key
Information saved to [/var/lib/csf/da1639404846.error]
csf session key
csf – No valid session key

This is because of a mismatch session key, caused by a change of your’s computer IP.

The content of the referred file (da1639404846.error):

To disable DirectAdmin session checks, create a touch file called /var/lib/csf/csf.da.skip

Security Error: No valid session key

Session ID = [KJQcbtVeoiGRgXZRX5colYpLnepEZrhrB8Um1xQbdeEJ9llfpLRarEvcskrPaYEj]
Session File [/usr/local/directadmin/data/sessions/da_sess_KJQcbtVeoiGRgXZRX5colYwLnepEZrhrB8Um1xQndeEJ9llfpLRarEvcskrPaYEj]...exists.

Environment data:
REMOTE_ADDR = [x.x.26.21]
SESSION_KEY = [egTeesPHUeZcNIHCdgmTug5kOu9wRLf527hgz7xRjU36mIHOy3rqhua2ph0G3eJ5]
SESSION_ID = [

KJQcbtVeoiGRgXZRX5colYpLnepEZrhrB8Um1xQbdeEJ9llfpLRarEvcskrPaYEj]

Session data:
ip = [x.x.26.21]
key = [egTeesPHUeZcNIHCdgmTug5kOu9wRLf527hgz7xRjU36mIHOy3rqhua2ph0G3eJ5]

Session file contents:
home_memory=3
host=web.plothost.com
ip=x.x.245.175
key=egTeesPHUeZcNIHCdgmTug5kOu9wRLf527hgz7xRjU36mIHOy3rqhua2ph0G3eJ5
passwd=ZGRSOU22NW5GNWZk
username=admin

As you can see the two IPs are different.

The solution is to log out of cPanel/DirectAdmin and log in again. This will fix the error.

Leave a Reply