Member of the two-component regulatory system PmrA/PmrB that plays a role in the regulation of resistance towards polymyxin B and cationic antimicrobial peptides in response to limiting concentrations of Mg(2+). Autoregulates also its own pmrAB operon under Mg(2+)-limiting conditions (PubMed:14507375). May function as a membrane-associated protein kinase that phosphorylates PmrA in response to environmental signals leading to activation of specific gene promoters (Probable). ATP + protein L-histidine = ADP + protein N-phospho-L-histidine. By cationic antimicrobial peptides and by Mg(2+)-limiting conditions.