The stronger and more cautious position among scholars is to avoid physical contact with non-mahram members of the opposite gender, following the Prophet's ﷺ example. A polite verbal greeting can replace a handshake where it would cause offence.
References
No specific citation was provided for this answer. Verify with a qualified scholar and the primary sources.
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.