sync.Once contains sync.noCopy and cannot be assigned by value. Reset with a fresh sync.Once{} in defer instead of save/restore. Also gitignore known_hosts.json runtime data.