  We introduce a modification of the standard entanglement swapping protocol
where the generation of entanglement between two distant modes is realized and
verified using only local optical measurements. We show, indeed, that a simple
condition on the purity of the initial state involving also an ancillary mode
is sufficient to guarantee the success of the protocol by local measurements
{M. Abdi \textit{et al.}, Phys. Rev. Lett. \textbf{109}, 143601 (2012)}]. We
apply the proposed protocol to a tripartite optomechanical system where the
never interacting mechanical modes become entangled and certified using only
local optical measurements.
