This is not an uncommon scenario on Chicago streets. Generally, it's the precursor to being asked for money; where it goes from there can be unpredictable.
First, with all due deference to the martial artists who have offered their suggestions, your suggestions aren't going to work for most people. I've had a bit of martial arts training, and my experience is that it takes a lot of practice to successfully employ those techniques. Also, lest anyone be convinced by the videos, my experience has also been that these training scenarios often see the purported "bad guy" sparring partner reacting in the optimal fashion to allow the lock, hold or strike to be employed. I don't think it's intentional chicanery, but I've seen this in martial arts classes--the bad guy-soon-to-be-beaten-up-guy subconsciously acts and reacts in a manner that allows the technique to succeed. In life, it often doesn't work out that way. The muggers haven't seen the video.
Anyway, this is my approach: While it is not generally the case in American society, occasionally a well-intentioned stranger will offer a handshake. If my gut tells me that's what's happening, I'll go with the flow. However, that's not a scenario that has presented itself to me on Chicago streets. If approached, I hold up my hand, palm facing the stranger (the "halt" gesture) and either say "No!" or "Not now!" Sometimes that will generate a muttered response, but generally they just move on to the next target.
Really, it's all about control. If you succumb to their nonverbal initiative, you may have lost both the physical and psychological edge you need to maintain your safety. If you set the terms of your encounter, you maintain your options. When these things happen, I'd also suggest that you need to maintain total situational awareness--often the scammers and strong-arm robbers operate in tandem with others. Don't assume that the guy approaching you overtly is the only one "working" you.