I don't tend to have my bike with me when I use cash machines, but if I did I would just enforce my usual
exclusion zone of 2+ metres. No male (or tough-looking female!) is allowed to get closer to me when I'm using the machine.
Someone I once worked with was smacked about the head with a blunt instrument just after typing in his PIN and his assailant then withdrew £250 (maximum allowed) and nicked his bank card. I've been very wary after hearing about that...
A couple of years later I was about to use my local cash machine. I looked around and there was nobody in sight so I entered my PIN, and had just chosen CASH WITHDRAWAL when I heard deep male voices from close behind me. I didn't turn round but the hairs on the back of my neck were standing on end as I waited for my cash to appear. The two guys were apparently just fooling about behind me, but my adrenaline was pumping. Suddenly one of the guys pushed the other and he lunged against me forcing me up against the machine. I went absolutely bonkers and turned round and shoved him as hard as I could and screamed
"F*** off back over there, both of you - NOW!!!!". It was only then that I realised that the two young men were both about 6' 4" tall... They jumped back and apologised for bumping into me. They looked so shaken that I almost ended up apologising to
them 
.