Place the beans, ham, potatoes and onions in a large pot. Add enough water to come about halfway up the ingredients. Add pepper. Bring to a boil; cover, reduce heat and cook until ham and beans are tender, about 1-1/2 hours. (Cooking time will depend on the age of the beans, but they should be very tender.)
Remove the ham and cut into bite-size pieces. Taste the beans and, if needed, add salt. Return the ham to the pot and cook for another 10 minutes.
Place on individual serving plates and pass the vinegar.