Gunmen killed 10 people in the village of Shawa and a further 17 in Alagarno, police and witnesses said.
The area is near Chibok, where the schoolgirls were abducted last month.
On Tuesday 118 people died in a double bombing in the central city of Jos, also blamed on Boko Haram.
The abductions of more than 200 girls caused international outrage and prompted foreign powers, including the US, to send military advisers to assist Nigeria’s army.
In another development on Wednesday, US President Barack Obama said 80 military personnel had been deployed to neighbouring Chad to help search for the missing girls.
“These personnel will support the operation of intelligence, surveillance and reconnaissance aircraft for missions over northern Nigeria and the surrounding area,” Mr Obama said in a letter to Congress.
Many parts of restive north-east Nigeria are no-go zones for the military and insurgents operate freely there, correspondents say.