salt-ssh permission denied when attempting to log into remote system
<p>I am new to salt-ssh and I have gotten it to work successfully for setting up a remote system. However, I have a login issue that I don't know how to address. What is happening is that when I try to run the salt-ssh commands I have to fight with then initial login process before eventually it just works. I am looking to see if I can narrow down what is causing me to have to fight with login process.</p>

<p>I am using OS X to run my salt-ssh commands against an ubuntu vagrant vm.</p>

<p>I have added my root user's ssh key to the root user authorized_keys on the vagrant vm. I have verified that I can log into the system using ssh without any issues</p>

<pre><code>sudo ssh root@192.168.33.10
</code></pre>

<p>Here are what my config files look like:</p>

<p>roster</p>

<pre><code>managed:
 host: 192.168.33.10
 user: root
 sudo: true
</code></pre>

<p>Saltfile</p>

<pre><code>salt-ssh:
  config_dir: /users/vmcilwain/projects/salt-ssh-rails
  roster_file: /users/vmcilwain/projects/salt-ssh-rails/roster
  log_file: /users/vmcilwain/projects/salt-ssh-rails/saltlog.txt
</code></pre>

<p>master</p>

<pre><code>file_roots:
  base:
    - /users/vmcilwain/projects/salt-ssh-rails/states

pillar_roots:
  base:
  - /users/vmcilwain/projects/salt-ssh-rails/pillars
</code></pre>

<p>I run this command:</p>

<pre><code>sudo salt-ssh -i '*' test.ping
</code></pre>

<p>I enter my local user's password and I get this output</p>

<pre><code>Permission denied for host 192.168.33.10, do you want to deploy the salt-ssh key? (password required):
[Y/n]
</code></pre>

<p>This is where my fight is. If the vagrant vm has the ssh key for the user I am executing salt-ssh as, why am I being told that permission is denied? Especially when I verified I could ssh into the system without using salt-ssh.</p>

<p>Clicking yes prompts me for the remote root user's password, which I didn't set and don't necessarily want to since an ssh key should have worked.</p>

<p>I'm hoping someone can tell me the best way to setup connections between both systems so that I don't have to have this fight every time.</p>