Technological developments within the maritime sector are resulting in rapid progress that will see the commercial use of autonomous vessels, known as Maritime Autonomous Surface Ships (MASSs). Such ships are equipped with a range of advanced technologies, such as IoT devices, artificial intelligence (AI) systems, machine learning (ML)-based algorithms, and augmented reality (AR) tools. Through such technologies, the autonomous vessels can be remotely controlled from Shore Control Centres (SCCs) by using real-time data to optimise their operations, enhance safety, and reduce the possibility of human error. Apart from the regulatory aspects, which are under definition by the International Maritime Organisation (IMO), cybersecurity vulnerabilities must be considered and properly addressed to prevent such complex systems from being tampered with. This paper proposes an approach that operates on two different levels to address cybersecurity. On one side, our solution is intended to secure communication channels between the SCCs and the vessels using Secure Exchange and COMmunication (SECOM) standard; on the other side, it aims to secure the underlying digital infrastructure in charge of data collection, storage and processing by relying on a set of machine learning (ML) algorithms for anomaly and intrusion detection. The proposed approach is validated against a real implementation of the SCC deployed in the Livorno seaport premises. Finally, the experimental results and the performance evaluation are provided to assess its effectiveness accordingly.