There seems to be a custom that men hug (kiss) each other when they greet each other.   
Are Jews permitted to do so?

What I found so far:

Shulchan Aruch [20:1][1]
>הבא על אחת מן העריות דרך איברים או **שחבק ונשק** ונהנה בקירוב בשר הרי זה לוקה וחשוד על העריות:  
>...or he **hugged and kissed** (one of the people with whom sexual relations are forbidden) or had pleasure from the nearness of the flesh, he receives lashes....   

Shulchan Aruch [21:7][2]
>המחבק או המנשק אחת מהעריות שאין לבו של אדם נוקפו עליהם כגון אחותו הגדולה ואחות אביו וכיוצא בהם **אע"פ שאין לו שום הנאה כלל הרי זה מגונה ביותר ודבר איסור הוא ומעשה טפשים** שאין קרבים לערוה כלל בין גדולה בין קטנה חוץ מהאב לבתו ומהאם לבנה   
>To hug or kiss one of the arayos whom people do not normally lust after, such as his adult sister or his aunt or similar, **even though he derives no pleasure at all, is very reprehensible, forbidden, and the act of a fool**. This is because there are no relatives for [the purposes of] licentiousness at all, whether adult or minor, except the father to his daughter and the mother to her son.

Aruch Hashulchan [20:18][3]   
>כן אסור לאיש להתחכך לאיש באיבריו דרך תאוה   
>It is also forbidden for a man to rub another man on his limbs in a lustful way

Beer Haitiv [24:1][4]    
>it is forbidden for 2 single men to sleep together (in privacy), and this behavior should be protested against  

---

kissing might only be a problem if on the lips so this question is mainly regarding hugging   
Rabainu Bechaya [29:11][5]  
>...We should also note that Yaakov did **not** kiss Rachel **on the mouth** but on the head or the shoulder, suggesting that there was no sexual element in that kiss (Ibn Ezra)


  [1]: https://www.sefaria.org/Shulchan_Arukh%2C_Even_HaEzer.20.1
  [2]: https://www.sefaria.org/Shulchan_Arukh%2C_Even_HaEzer.21.7
  [3]: https://www.sefaria.org/Arukh_HaShulchan%2C_Even_HaEzer.20.18
  [4]: https://www.sefaria.org/Ba'er_Hetev_on_Shulchan_Arukh%2C_Even_HaEzer.24.1
  [5]: https://www.sefaria.org/Rabbeinu_Bahya%2C_Bereshit.29.11