Ok, as I have a lot of confusion right now I need to ask to get this resolved
My usecase: Use the production type image without balenaCloud or other things.
So I download the latest production image from balenaOS - Run Docker containers on embedded IoT devices, then set the config.json before the first boot:
{
"deviceType": "raspberrypi4-64",
"persistentLogging": false,
"hostname": "rpi01",
"developmentMode": false,
"country": "DE",
"ntpServers": "ptbtime1.ptb.de ptbtime2.ptb.de ptbtime3.ptb.de",
"dnsServers": "1.1.1.1 1.0.0.1",
"os": {
"sshKeys": [
"myPublicSSHKey"
]
}
}
after booting, I make a balena scan
host: rpi01.local
address: 192.168.4.200
osVariant: production
so far, so good. Trying to access balenaOS does not work
balena ssh rpi01.local USERNAME@rpi01.local: Permission denied (publickey).
SSH: Process exited with non-zero status code "255"
Are the SSH keys correctly configured in balenaCloud? See:
https://www.balena.io/docs/learn/manage/ssh-access/#add-an-ssh-key-to-balenacloud
Ar`?
obviously, it cannot connect, because balenaCLI does not know the private key I used. Accessing it manually does work
ssh 192.168.4.200 -lroot -p22222 -i ..\rpi01priv
So, now the big question: How can I add my local ssh private key into balenaCLI for use, so that I can locally build and push to this device without a) using balenaCloud or other external services (yeah, I need internet for downloading from Docker Hub etc, that is understood ) and without using b) a development image (does not matter if configured in local mode or not, development images are evil )
Any thoughts?
Thanks!