You glue/epoxy it to a magnet and use a magnet on the outside to hold it in place(get a sealed magnet tho on the inside). Suction cups suck... or rather they don't...
I have a JBJ 1800 powerhead that I used silicone on, to attach to a large Mag-Float. It's on my 90gal tank and I had the smaller, regtangle Mag-Float laying around, but used that one more than the big, square one.