<p>Note: My question is very similar to <br>
<a href="https://stackoverflow.com/questions/25494761/file-location-if-target-path-not-specified-with-scp-command/25496316">File location if target path not specified with scp command</a>
<br>But that question is asking what the target of this is:</p>

<pre><code>scp -r /localdir/ root@ubuntu
</code></pre>

<p>My question is asking what the target of this is:</p>

<pre><code>scp -r /localdir/ root@ubuntu:
</code></pre>

<p>Also if anyone's curious I found this syntax on the following webpage: <br>
<a href="https://kubernetes.io/docs/setup/independent/high-availability/#copy-required-files-to-the-correct-locations" rel="nofollow noreferrer">https://kubernetes.io/docs/setup/independent/high-availability/#copy-required-files-to-the-correct-locations</a></p>

<p>It's a Bash Script:</p>

<pre><code>USER=ubuntu # customizable
CONTROL_PLANE_IPS="10.0.0.7 10.0.0.8"
for host in ${CONTROL_PLANE_IPS}; do
    scp /etc/kubernetes/pki/ca.crt "${USER}"@$host:
    scp /etc/kubernetes/pki/ca.key "${USER}"@$host:
    scp /etc/kubernetes/pki/sa.key "${USER}"@$host:
    scp /etc/kubernetes/pki/sa.pub "${USER}"@$host:
    scp /etc/kubernetes/pki/front-proxy-ca.crt "${USER}"@$host:
    scp /etc/kubernetes/pki/front-proxy-ca.key "${USER}"@$host:
done
</code></pre>

<p>In my test, I ran the command as follows to copy <code>test</code> folder from host <code>heron01</code> to host <code>heron02</code>:</p>

<pre><code>yitian@heron01:~$ scp -r test/ yitian@heron02:
</code></pre>

<p>And the result shows that the <code>test</code> folder can be found at:</p>

<pre><code>yitian@heron02:~$ pwd
/home/yitian
</code></pre>

<p>So, the result of your question is: The target directory is the <code>home directory</code> of the target user you are using in the scp command. In my example, the target directory is: <code>/home/yitian</code> in host <code>heron02</code>.</p>
