When accidentally removed the SSH host keys from docker host, but Azure IoTEdge is still available. This image regenerates SSH host keys in a mapped volume.
To run one time on the /etc folder.
docker run --rm --privileged -v /etc:/home/etc enterz1983/sshregen
Be aware, this runs privileged!
Script generates:
Create a layered deployment for your IoT Edge environment. This sample creates a deployment with priviledged flag and mounts the host /etc in the container. Although the script runs idempotent (no overwrite of existing key files), it only runs once!
{
"content": {
"modulesContent": {
"$edgeAgent": {
"properties.desired.modules.sshRegen": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "never",
"settings": {
"image": "enterz1983/sshregen:latest",
"createOptions": "{\"NetworkingConfig\":{\"EndpointsConfig\":{\"host\":{}}},\"HostConfig\":{\"Privileged\":\"true\",\"Binds\":[\"/etc:/home/etc/\"],\"LogConfig\":{\"Type\":\"json-file\",\"Config\":{\"max-size\":\"10m\",\"max-file\":\"3\"}}}}"
}
}
}
}
}
}
Content type
Image
Digest
sha256:ac910c6d4…
Size
4.7 MB
Last updated
over 3 years ago
docker pull enterz1983/sshregen