title: scp failure: Unauthorized access is prohibited
body: <p>I try to write a script to "scp" a file from local server A to remote server B. 
  What I have done is generate the public key from server A, and add it into server B "authorized_keys". Everything is find.
  I do a small test, and ssh from A to B without password successfully. Here is the command </p>
  
  <pre><code>$ ssh userid@serverB
  </code></pre>
  
  <p>But here is the question. when I try to execute scp command, get failure because of "Unauthorized access is prohibited".</p>
  
  <pre><code>-bash-4.1$ scp file_name userid@serverB:~
  Unauthorized access is prohibited
  file_name                                         100%    0     0.0KB/s   00:00
  </code></pre>
  
  <p>I have spent a lots of time to find out the reason, but cannot get the right answer.
  Could anyone let me know, why this happen? Thanks a lot.</p>