Preheat the oven to 375 degrees and lightly grease an 8x8 baking dish.
Melt the butter in a medium saucepan over medium heat. Whisk in the flour and cook for one minute until bubbly.
Slowly whisk in the milk, salt, and pepper. Cook, stirring often, until the sauce thickens slightly, about 3 minutes.
Remove the sauce from heat and stir in 3/4 cup of the cheddar cheese until melted.
Spread half the potato slices in the baking dish. Top with half the ham and half the sauce. Repeat the layers with the remaining potatoes, ham, and sauce.
Cover the dish with foil and bake for 45 minutes.
Remove the foil, sprinkle the remaining cheddar cheese over the top, and bake uncovered for 15 more minutes until the cheese is melted and the potatoes are tender.
Scatter the bacon bits and green onions over the casserole before serving.