salt: Problem with salt-api and salt-ssh

Hi,

I’m trying to use salt-ssh with salt-api and it didn’t work.

When I execute the normal sentence it works:

salt-ssh 'MachineSSH' test.ping

But when I tried to run over salt-api appears an error:

david@david-PC:~$ curl -si localhost:9191/run -H 'Accept: application/x-yaml' -d client='ssh' -d tgt='MachineSSH' -d fun='test.ping'
HTTP/1.1 200 OK
Content-Length: 388
Access-Control-Expose-Headers: GET, POST
Vary: Accept-Encoding
Server: CherryPy/3.2.2
Allow: GET, HEAD, POST
Access-Control-Allow-Credentials: true
Date: Mon, 02 May 2016 07:55:40 GMT
Access-Control-Allow-Origin: *
Content-Type: application/x-yaml

return:
- MachineSSH:
    retcode: 254
    stderr: ''
    stdout: 'The host key needs to be accepted, to auto accept run salt-ssh with the
      -i flag:

      The authenticity of host ''192.168.254.2 (192.168.254.2)'' can''t be established.

      ECDSA key fingerprint is ad:27:39:e6:20:0a:3b:15:a7:82:b4:1c:e6:ba:4d:f0.

      Are you sure you want to continue connecting (yes/no)? '

I don’t know how to pass “-i” flag via curl.

Can anyone help me please?

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

@whiteinge Thanks,my solution is in master server add /root/.ssh/config: cat /root/.ssh/config Host * StrictHostKeyChecking no

now is Skip this Warning notices

One of the most important things of salt-ssh it’s the installation of minions daemons in the target hosts, however this type of unmaintained issues forces the use of Ansible to install Salt minions, which is an aberration that makes you wonder if this project is worth it, unfortunately.

Any changes? This project is alive?