Hi Deyvid Todorov,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
To resolve the connection errors with sfctl when using a self-signed certificate on Windows 11, please follow these steps:
Import the self-signed certificate into the Trusted Root Certification Authorities store on your Windows 11 machine. Open the Certificate Manager by typing certmgr.msc in the Run dialog (Win + R). Navigate to Trusted Root Certification Authorities > Certificates. Right-click and select Import, then follow the prompts to import your .pem certificate.
Verify you are specifying the correct paths to your certificate and key files. If you have exported the certificate and key separately, use the --cert and --key options. Example command:
sfctl cluster select --endpoint "https://my-service-fabric.cluster:19080" --cert ./mycert.pem --key ./mykey.pem --no-verify
Make sure that both your sfctl and Service Fabric cluster are up to date. Compatibility issues can sometimes cause unexpected errors.
For more details, please refer to below documentation:
Service Fabric cluster security scenarios
If an answer has been helpful, please consider accept the answer and "Upvote" to help increase visibility of this question for other members of the Microsoft Q&A community.