I am trying to make a Python script on Cent OS 8 but I constantly get this 'NameError' message and I just can't figure out what could be the problem. Here you'll see screenshots of both my script and the error message.
Thanks in advance for the help.
You have to mention the full path of the file "sshdlog" like with open("full path to sshdlog file") as f
or your script and sshdlog is in same directory.