Hi I am trying to transfer files from 1 droplet to another (they are in the same region). I found some articles about doing it using the VPC private IP.
I’ve tried a few things and I haven’t been able to get it working yet.
Please can someone give some guidance?
This is what I’ve tried on the droplet with the files:
Result:
scp -r /html/wp-content/testingthis root@12.134.5.6:/html/wp-content/
The authenticity of host '12.134.5.6 (12.134.5.6)' can't be established.
ED25519 key fingerprint is SHA256:FingerPrintStringHere.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? FingerPrintStringHere
Warning: Permanently added '12.134.5.6' (ED25519) to the list of known hosts.
root@12.134.5.6: Permission denied (publickey).
lost connection
I then tried
I then copied the contents of the vpcfile.pub and pasted it into the remote destination droplet:
And then did this on both droplets:
I then tried this cmd again:
And got this result:
root@12.134.5.6: Permission denied (publickey).
lost connection
I’ve tried following the instructions from these sites:
Please can someone advise on how to get this working?
Thank you
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there,
As you’ve generated your SSH key with a non-standard name, the
scp
command is failing to find it. You need to specify the correct private key file when usingscp
:Make sure you have the correct private key file (in this case,
vpcfile
) on the source droplet.Use the
-i
option withscp
to specify the private key file. Run the following command on the source droplet:Replace
/root/.ssh/vpcfile
with the actual path to yourvpcfile
private key if this is not the one.This command should now work without any permission issues.
Let me know how it goes!
Best,
Bobby