When using projects with ssh keys, I'm a bit confused on how the ssh keys are loaded by Node-RED:
If I start Node-RED normally and create a key, the key will be prepended by __default.
If I then start Node-RED using pm2, it doesn't see the keys anymore. If I re-create keys they show admin (which I assume is the user pm2 starts with ?).
In order to see my original keys that were first created, renaming __default to admin seems to work.
I'm confused however on why I can't see the original keys when I start Node-RED using pm2...
I think you need to provide a bit more context. It isn't clear where/how you are trying to use the keys.
In the Node-RED editor in project mode.
There’s a section where you can generate keys.
Ah, projects. Now that makes more sense
I'm afraid though that I don't use the projects feature. Hopefully others will know more.
Hi @nlecaude
When we create keys, we prefix the filename with the node-red user name. If adminAuth isn't enabled, we use __default
as the 'user name' part of the filename. The system user the process is running under is irrelevant. We do that so in a multi-user system, we know which keys belong to which user.
The only way I can explain what you are seeing is if you don't have adminAuth setup when running 'normally', but you do when running under pm2 - and that admin
is the username you have setup in adminAuth
.
Ahhh that makes sense !
Indeed the first time I start is without pm2 so that explains what I was seeing.
Thanks Nick !
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.