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!
Accepted Answer
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 using scp
:
Make sure you have the correct private key file (in this case, vpcfile
) on the source droplet.
Use the -i
option with scp
to specify the private key file. Run the following command on the source droplet:
scp -i /root/.ssh/vpcfile -r /html/wp-content/testingthis root@12.134.5.6:/html/wp-content/
Replace /root/.ssh/vpcfile
with the actual path to your vpcfile
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.