Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
16.7 Legacy Series
»
[SOLVED] authorized_keys keeps getting deleted somehow
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] authorized_keys keeps getting deleted somehow (Read 10588 times)
cake
Jr. Member
Posts: 64
Karma: 13
[SOLVED] authorized_keys keeps getting deleted somehow
«
on:
September 03, 2016, 12:03:01 pm »
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?
«
Last Edit: September 03, 2016, 01:40:41 pm by franco
»
Logged
franco
Administrator
Hero Member
Posts: 17473
Karma: 1587
Re: authorized_keys keeps getting deleted somehow
«
Reply #1 on:
September 03, 2016, 12:19:30 pm »
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?
Logged
cake
Jr. Member
Posts: 64
Karma: 13
Re: authorized_keys keeps getting deleted somehow
«
Reply #2 on:
September 03, 2016, 01:04:51 pm »
ok Franco I'll give it a try.
Your very helpful around here. Thanks!
Edit: It worked!
«
Last Edit: September 03, 2016, 01:15:16 pm by cake
»
Logged
franco
Administrator
Hero Member
Posts: 17473
Karma: 1587
Re: [SOLVED] authorized_keys keeps getting deleted somehow
«
Reply #3 on:
September 03, 2016, 01:40:50 pm »
Yay, sure thing.
Logged
reep
Jr. Member
Posts: 68
Karma: 8
Re: [SOLVED] authorized_keys keeps getting deleted somehow
«
Reply #4 on:
September 03, 2016, 08:32:36 pm »
I think you can generally add keys to /rooot/.ssh/authorized_keys2
This would not be overwritten by any templating
B. Rgds
Johm
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
16.7 Legacy Series
»
[SOLVED] authorized_keys keeps getting deleted somehow