Sundby had taken an education in engineering. When Norway was invaded by Germany in 1940, he became involved in the subsequent fighting. He later involved himself in the Norwegian resistance movement, both in Milorg, as a courier and intelligence gatherer. When the Nazi police leader Karl Marthinsen was assassinated by the Norwegian resistance on 8 February 1945, Sundby was arrested together with thirty-three others, including Carl Ferdinand Gjerdrum, Haakon Sæthre and Jon Vislie, as a reprisal. Sundby was executed on Akershus Fortress on 9 February, his body lowered in the Oslofjord.