[SOLVED] authorized_keys keeps getting deleted somehow

Started by cake, September 03, 2016, 12:03:01 PM

Previous topic - Next topic
I took a quick search all I found was this https://forum.opnsense.org/index.php?topic=1930.msg5996#msg5996 which doesnt help me.

Anyways, I created a new user on OpnSense, and authorized SSH logins for the user (not admin). I then copied a key over to  ~/.ssh/authorized_keys of the new user. I check that it is added. I checked I can log in (ssh) without the password to the new user on OpnSense.

I tested it out scp to transfer a file automatically as working with out password. Well later on one of my machines can't automatically scp into OpnSense, and I find the key I added earlier to the user account with ssh privileges is missing twice now. (empty file)

I may have rebooted the OpnSense box twice in between testing and sorting stuff out.
Am I missing something or is this operator error and I need to sniff around the logs?

Authorized keys are set in the GUI for each user (edit), then automatically carried over to the file. Since it's empty for your user, it probably wipes the file?

September 03, 2016, 01:04:51 PM #2 Last Edit: September 03, 2016, 01:15:16 PM by cake
ok Franco I'll give it a try.

Your very helpful around here. Thanks!

Edit: It worked!


I think you can generally add keys to /rooot/.ssh/authorized_keys2

This would not be overwritten by any templating

B. Rgds
Johm