Consumer routers have had this issue solved for ages: you generate a random password and put it physically on the device.
(See also: opt-in versus opt-out for retirement plans, organ donation...heck, even this from yesterday: https://news.ycombinator.com/item?id=43144611)
https://en.wikipedia.org/wiki/QR_code#Joining_a_Wi%E2%80%91F...
It doesn't have to be complicated. A random passphrase can be much simpler and include significantly more entropy: four to six words plus a six-digit number. Any password generator worth a damn can generate something like this.
(But remote ssh login is disabled by default.)