The present invention relates to a novel method for synthesizing, without a solvent, N-alkyl-glycosyl(di)amine derivatives represented by the following general formula (I): The invention also concerns the use of N-alkyl-glycosyl(di)amine derivatives represented by the general formula (I), and N-alkyl-glycosyl(di)ammonium quaternary salts represented by the general formula (II) and N-alkyl-glycamine derivatives represented by the general formula (III) obtained from N-alkyl-glycosyl(di)amine derivatives represented by the general formula (I), as antibacterial and/or antifungal agents against phytopathogens.