I've seen this question asked before but the answers always seemed to lack some specificity. I am having trouble moving some user interface files from my own machine to my server which resides on a Digital Ocean Droplet with Ubuntu 20.04. I can connect to my server just fine via SSH. I have a non-root user configured and the public RSA key of my machine is in .ssh/authorized_keys on the server.
However, when I try to SCP the files from my local machine to my server with
sudo scp -rv path/to/folder user@<ip>:/var/www/html
I get a response
The authenticity of host <ip> can't be established.
ECDSA key fingerprint is <fingerprint>.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
which is talking about an ECDSA key fingerprint not matching. I have not configured a ECDSA key. Is it the default behaviour of SCP to use ECDSA? I even tried to add the -i flag to specify the identity file directly (the private RSA key on my machine) but it did not have any effect on the outcome.
There were some answers that mentioned that this happens when connecting first time to the server. However, I have connected to this server via SSH before. Is it different when using SCP, i.e. does this count as a first connection?
sudo ssh …
?sudo
. Earlier I got a "Permission denied" error when trying to SCP the files into/var/www
on the server. I thought the problem was because I was not usingsudo
.sudo
on the client will not grant you privileges (like write access to/var/www
) on the server.