InfinityFree Putty?

I try connecting to my server with putty but I always get “Connection refused” or “Server unexpecedly closed connection”

We don’t support SSH access (or any kind of command line access for that matter) on free hosting, so you cannot connect to your account with Putty. Most (low cost) website hosting services don’t provide SSH access.