How to capture a remote server in different network from home?

I want to capture packets from a remote server using Wireshark. I have a Linux-based server and I can access to it through Putty. This remote server is not on my network. How could I access to a remote server packets and especially MQTT protocol from my home using Wireshark?

I used a remote SSH configuration, but it seems I can't capture the data.

screenshot of wireshark


You can run wireshark on remote server (e.g. via ssh) and transfer results back to your machine for convenience.

E.g. this article has an example: ssh [email protected] 'tshark -f "port !22" -w -' | wireshark -k -i - - I'll run capture on remote machine, pipe results to local wireshark where you'd be able to see results in nice GUI.