19.05.2021, 07:56
This script will create a key that has been generated on another LM:
Code:
key = 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCyAiQPWmdF+BK4zJb8KIbebYH03v+K8x4mq6sK59k9t1dstpF5Um8LUK2dpwdcdI3hYme1fIwPvMJd3a/1GN06lnW+ASGSRalDxK0H7WXiKBnGpNMKo0SfKbd4+fXNUjdiemjYCGev1WP66MUq3bw9PN2ISXkm5YjOnvARwZVvK5JlXAo67Jsy0J2UXDX1EAEz7ekGx/RcpBPFzQzLEDG4j1Ny1QVfBsi7V9qfuf9L+mxqulpDy5FAG0Pksmzx/8XCL4a0c7iAvehi+5svMBCpS0zraf9W2rtdTaX7TH6zfv2ORxIDP1BIhQi4W9+zvETZPgU8i6VqyFfxDAgQ0TnTAAABADbUBftcoxagFFQrYA4HBZOZM0ATN666t3y9v486XmVuBVWM3j36MA3SKce3XMMTe2gCgWMbG6D1SQDUeZAKuomDMnz1qDt/jWU8PPeGHa2NIHNY7VAHfelwVfzDMPyu6DRC8+wmmplEJulvrNtJNOO/zZRe3Rwn8v2BYvx1HewBgYuNEyyTnBYGxFejYg08yOY/88C4aHJ5CYitHlSa+xPWV3jV/5uydNlsix2qFK9sKz+Un62oqAVz8ldBdFgFiBGiYvftTAPbkhnI5KsWawvFL3Q3azT0TuIzdfJE/TGUZkx5wSPxy3JGqTwkqw9O3TuoBrxnyxm2ikhLWjc/zeEAAACBAME4q9IQTTAzgm/T+0G4osRsOmkHJtPrlxAghYfIBb6y/7spdHRjA+PPFvCicKS4EUj4xUM6c98rXWaA/CunYxWVdR8tjmWsm592o51GHVR4LepgdmUeey70hIKgAvMCtrTy2jpjdV0FrjPOOrZCRNtQViR71i62I4rpiytr02r5AAAAgQDr2B3Veql0KIlftrFwNTzxQgv+z4L6tsiH8s8ncnle30s405fNwr0CWMTZ7mhyHzmVvTBgFOEFYBlOF6XGAM3XulsHFq58sK4eJGLEDh3KzJgHvzDJuPM4bBqhkmRCyXEB2wMnptqFTofaovwDeTQWylrFvAj+dexAbOnp4H7SKw=='
key = require('encdec').base64dec(key)
io.writefile('/lib/genohm-scada/storage/id_rsa', key)
os.execute('chmod 0600 /lib/genohm-scada/storage/id_rsa')