title: SCP copying error : Not a directory
body: <p>I want to copy a file from my local system to a remote host. I want to specify the file name while copying.</p>
  
  <p>This is my command for copying.</p>
  
  <pre><code>scp config/1 root@remote:/home/user/config/2
  </code></pre>
  
  <p>I want to rename the file while copying or with the same name like this. </p>
  
  <pre><code>scp config/1 root@remote:/home/user/config/1
  </code></pre>
  
  <p>But I dont want to use like the below command.</p>
  
  <pre><code>scp config/1 root@remote:/home/user/config/
  </code></pre>
  
  <p>When I specify the filename i get the error: Not a directory</p>