Project

General

Profile

Actions

Bug #218

closed

admin's SSH key written to wrong location

Added by Chris Buechler almost 15 years ago. Updated over 14 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
User Manager / Privileges
Target version:
Start date:
12/13/2009
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

After adding authorized keys in the user manager and saving, these keys are not written out to the authorized_keys file.

To replicate:
edit admin, add SSH key, save.

Actions #1

Updated by Pierre POMES almost 15 years ago

I tried to add a SSH key to the default admin user, the authorized_key files is created successfully:

  1. pwd
    /home
  2. ls la admin/.ssh/authorized_keys
    -rw-r--r-
    1 root wheel 604 Dec 13 21:11 admin/.ssh/authorized_keys

I also tried to define a new user and add a SSH key, this also works:

  1. ls la ppomes/.ssh/authorized_keys
    -rw-r--r-
    1 ppomes nobody 604 Dec 13 21:18 ppomes/.ssh/authorized_keys

Can you confirm you are talking about the ${HOME}/.ssh/authorized_keys file ?

Actions #2

Updated by Chris Buechler almost 15 years ago

This is the first I've tried it on 2.0 (in a long while at least, maybe ever). I don't have a .ssh directory at all.

[]/root(4):ls -l ~admin/.ssh
ls: /root/.ssh: No such file or directory

Running a snapshot from today, could be something that broke recently.

Actions #3

Updated by Chris Buechler almost 15 years ago

Same on a different box, running a Dec. 6 snapshot.

Actions #4

Updated by Pierre POMES almost 15 years ago

Strange ! I'am also running a snapshot from today (the first one of the day: http://snapshots.pfsense.org/FreeBSD_RELENG_8_0/i386/pfSense_HEAD/updates/pfSense-Full-Update-2.0-ALPHA-20091213-0603.tgz).

I tried again:

  1. pwd
    /home/admin
  2. rm -rf .ssh/

In the gui, I simply saved the user (the ssh key as already entered). And then:

  1. ls la .ssh/
    total 6
    drwx-----
    2 root wheel 512 Dec 13 21:29 .
    drwxr-xr-x 3 root wheel 512 Dec 13 21:29 ..
    rw-r--r- 1 root wheel 604 Dec 13 21:29 authorized_keys

Are you looking in /home/admin/.ssh or /root/.ssh ?

Actions #5

Updated by Chris Buechler almost 15 years ago

  • Subject changed from SSH keys not written out to admin's SSH key written to wrong location

Oh, I see what the problem is, admin's home directory is /root but the key gets written to /home/admin/ so it doesn't work.

Actions #6

Updated by Pierre POMES almost 15 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #7

Updated by Chris Buechler almost 15 years ago

  • Status changed from Feedback to Resolved

fixed, thanks!

Actions #8

Updated by Erik Fonnesbeck over 14 years ago

As of 38564fde256e83e26f1f65d28ff064e835206ec9 this has regressed. The fix was reverted for some reason in that commit. I don't really know whether there was any particular reason for that or if it needs to go somewhere else now.

Actions #9

Updated by Chris Buechler over 14 years ago

  • Status changed from Resolved to New
Actions #10

Updated by Jim Pingle over 14 years ago

  • Status changed from New to Feedback
Actions #11

Updated by Chris Buechler over 14 years ago

  • Status changed from Feedback to Resolved

fixed

Actions

Also available in: Atom PDF