Separator based sparsification II: edge and vertex connectivity