I was in the process of writing a post here to ask for your help, but I just figured out the cause of my problem. I will post the error message and the cause/fix here just in case it helps someone else in the future.
I have written a .NET console app that uses AlexFTPS component to check if an FTPS server is up and running or not. I run this app from two different VPS servers, both checking the same FTPS server, as a form of redundant monitoring. The
app suddenly stopped working today, but only from one of the two servers it was running on. The error I was getting was:
"The handshake failed due to an unexpected packet format"
After a fair bit of hair pulling as to why it would suddenly stop working, and only from one of the two servers, I realised that the only thing that had changed recently on the server with the problem is that I had added a new, additional, IP address.
It seems that now my internet traffic from that server is flowing over the new IP instead of the original IP (which I verified by visiting www.whatismyip.com). For most people that wouldn't be a problem of course - but in my case I had set up FileZilla
on the FTPS server to filter the IP's it would allow to connect.
So the fix was simply to add the new IP to my FileZilla IP filter.
Hopefully this helps others in the future. If you are getting this error message, just check in case you have IP filtering going on.
Many thanks to Alessandro for making this great utility by the way!