Fix ssh_authorized_key
When one uses the $name to define the user that should receive an SSH key, setting $user to a negative value, ssh_authorized_key currently creates the authorized_keys file under /home/.ssh/authorized_keys Fix this by changing ${user} to ${real_user} in the key's path. Signed-off-by: Gabriel Filion <lelutin@gmail.com>
This commit is contained in:
parent
35768ed1e8
commit
5bb61c2761
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ define sshd::ssh_authorized_key(
|
||||||
undef,'': {
|
undef,'': {
|
||||||
case $real_user {
|
case $real_user {
|
||||||
'root': { $real_target = '/root/.ssh/authorized_keys' }
|
'root': { $real_target = '/root/.ssh/authorized_keys' }
|
||||||
default: { $real_target = "/home/${user}/.ssh/authorized_keys" }
|
default: { $real_target = "/home/${real_user}/.ssh/authorized_keys" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
Loading…
Reference in a new issue