in order to connect with a counterparty with a PEM key, you have to install and config a new software.
In our production environment, we use sTunnel (https://www.stunnel.org/index.html) , a free software for tunnel and encrypt messages over a SSL layer.
Please download this sotware and read the manual for the config settings.