The majority of scholars believe that Aramaic rather than Hebrew was spoken by Jews in Palestine by Jesus' time. If this is the case, we would have to concede that Jesus using the greeting שָׁלוֹם לָכֶם (shalom lachem) would have been anachronistic.
What Jesus did say, however, would probably have been very close. We do not have any ancient Aramaic versions of the New Testament, but we have 2nd century Syriac - a closely related dialect - in the Peshitta:
ܘܗܝܕܝܢ wə-haydēn
On the evening of that
ܘܐܦ ܫܪܪܐ ʾāf sharrā
and the first day
ܡܛܠ ܟܘܢܬܐ ܕܫܪܪܐ məṯallāh kunthā d-sharrā
of the week, when the
disciples were together,
ܘܩܝܡܝܬܐ ܕܐܝܟܐ wə-qāyamēṯā d-ʾēkā
with the doors locked
ܗܘܘ ܒܐܢܫܐ hūn bə-ʾanšē
for fear of the Jewish leaders,
ܘܬܪܝܢܘܬܐ ܗܘܘ ܡܫܝܚܐ wə-taryēnwāṯā hūn mšīḥā
Jesus came and stood
among them and said,
ܐܠܐ ܡܢ ܠܐܒܘܢܝܬܐ Shlama lakum
“Peace be with you!”
Shlama lakhon is a very close facsimile of the Hebrew shalom lachem. If scholars were mistaken and Jews were still speaking Hebrew, or even if they were not but preserved this particular phrase for idiomatic reasons, we can be almost certain that Jesus would have said shalom lachem and not some other phrase.
In any case, I think it is safe to believe that Jesus said either shalom lachem or something in Aramaic that was very close.
Other semitic languages to this day have very similar phrases. Arabic and non-Arabic speaking moslems alike greet each other with the familiar As-salamu alaykum (السلام عليكم).