title: passing yes argument while scp command
body: <p>I am facing an issue when I run simply these commands.</p>
  
  <p>The remote server want to pass <code>yes</code> to add the key in RSA file because first time connection established with <code>scp</code>.</p>
  
  <p>commands are given below</p>
  
  <pre><code>#!/bin/bash
  
  scp  -P58222 root@IP:/root/K /N
  /usr/bin/expect -c 'expect "\n" { expect "Are you sure you want to continue connecting (yes/no)?" }'
  send "yes\r"
  expect "$ "
  send "exit\r"
  </code></pre>
  
  <p>Actually I have to pass yes in my script while asking</p>
  
  <p>The authenticity of host 'ip address (ip address)' can't be established.</p>
  
  <pre><code>RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
  Are you sure you want to continue connecting (yes/no)? 
  </code></pre>
  
  <blockquote>
    <p>Are you sure you want to continue connecting (yes/no)?</p>
  </blockquote>
  
  <p>how can I get rid of this problem?</p>
  
  <p>with  </p>
  
  <pre><code>scp -o  StrictHostKeyChecking=no
  </code></pre>
  
  <p>it is still asking.</p>