Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] salt-ssh fails with error command-line line 0: Missing argument #61650

Closed
1 of 6 tasks
0x416e746f6e opened this issue Feb 16, 2022 · 1 comment · Fixed by #61652
Closed
1 of 6 tasks

[BUG] salt-ssh fails with error command-line line 0: Missing argument #61650

0x416e746f6e opened this issue Feb 16, 2022 · 1 comment · Fixed by #61652
Assignees
Labels
Bug broken, incorrect, or confusing behavior Salt-SSH severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@0x416e746f6e
Copy link
Contributor

Description

If ssh config file is formatted like this:

Host test
    HostName       xxx.yyy.zzz.nnn
    IdentitiesOnly yes
    IdentityFile   ~/.ssh/test_id.pub  # <-- Note more than one space here

Then running command like salt-ssh -l trace --roster sshconfig 'test' -r 'hostname' fails with:

[DEBUG   ] Child Forked! PID: 98510  STDOUT_FD: 20  STDERR_FD: 22
[DEBUG   ] Terminal Command: ssh test -o KbdInteractiveAuthentication=no -o PasswordAuthentication=no -o GSSAPIAuthentication=no -o ConnectTimeout=65 -o Port=22 -o IdentityFile= ~/.ssh/test_id.pub -o User=root hostname
[TRACE   ] command-line line 0: Missing argument.

^-- note space after -o IdentityFile=.

Setup

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD

Steps to Reproduce the behavior

  • Add extra space(s) between IdentityFile and the path in your ssh config.
  • Try to run salt-ssh

Expected behavior

No errors.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3004
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: 2.8.0
     docker-py: Not Installed
         gitdb: 4.0.5
     gitpython: 3.1.12
        Jinja2: 2.11.3
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: 1.1.4
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.19
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: Not Installed
        Python: 3.7.12 (default, Feb 15 2022, 12:03:52)
  python-gnupg: 0.4.4
        PyYAML: 5.4.1
         PyZMQ: 18.0.1
         smmap: 3.0.2
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.1
 
System Versions:
          dist: darwin 21.2.0 
        locale: UTF-8
       machine: x86_64
       release: 21.2.0
        system: Darwin
       version: 12.1 x86_64
@0x416e746f6e 0x416e746f6e added Bug broken, incorrect, or confusing behavior needs-triage labels Feb 16, 2022
@welcome
Copy link

welcome bot commented Feb 16, 2022

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@OrangeDog OrangeDog added Salt-SSH severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around and removed needs-triage labels Feb 16, 2022
@OrangeDog OrangeDog added this to the Approved milestone Feb 16, 2022
Ch3LL pushed a commit to 0x416e746f6e/salt that referenced this issue Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Salt-SSH severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants