Skip to content

Forced command in ssh key with absolute path does not work #428

@arvatoth-vcc

Description

@arvatoth-vcc

Describe the Bug

Force command with full path does not work in ssh key.

Expected Behavior

When I would like to add a forced command with full path to the script, I got back Unmatched double quote raised exception. Please look example below.

Steps to Reproduce

Steps to reproduce the behavior:

  accounts::user { 'testuser':
    ensure      => present,
    group       => 'nogroup',
    shell       => '/bin/bash',
    managehome  => true,
    home_mode   => '0700',
    sshkeys     => [
      'no-port-forwarding,no-x11-forwarding,no-agent-forwarding,command="/usr/local/bin/test-script.sh" ssh-rsa AAAAB3NzaC1yc2EAAAADA........u7wbFJn testuser@localhost'
    ],
  }

Environment

  • Puppet Agent version v7.20.0
  • puppetlabs-accounts version v7.3.0
  • Platform Ubuntu 22.04

Additional Context

If I skip per (/) sign from value of command, there is no error, but full absolute path is mandatory for forced command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions