I followed the getting starter guides, etc, securing the server and such and now I need to deploy a release to the server and I’m using scp to do it but when it’s connecting to the server I get asked for a password and when I use it it throws me an error saying “Permission denied, please try again.” I can log in without trouble through ssh but can’t send files over with scp. I don’t know what password it is asking for or what I did wrong.
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!
Thanks @brandonc5e9f760d021b8bf3c5, that’s a good explanation, but I’m still not being successful. I’m using: scp -r ./VOCdevkit paperspace@xxx.xx.xx.xx:/home/paperspace/fastai/courses/dl2 where ./VOCdevkit is a local directory that I want to copy to a remote server (paperspace).
Does /path/to/private_key refer the a private key on paperspace or on my local machine. Thanks!
Any help on how to do this with a password from a mac? I’m getting no response from my mac terminal when I run the scp command.
It worked the other day without any special requirements for a password, but now it’s just hanging. No errors or messages. Just hanging. I’ve confirmed my ubuntu droplet has internet connectivity by ssh’ing into it and running a ping command.
My command is simple:
scp /local/path/to/my/file.file root@:0.0.0.0:/path/to/my/droplet
I’ve tried to move files both ways with scp (droplet --> local mac as well as local mac --> droplet).
Thanks in advance.
Are you using password-based authentication or SSH Keys to login to the server?
Are you using a PC or Mac (OS X / MacOS)?
…
If you’re logging in from a Mac, then you’ll need to specify the SSH Key when trying to transfer the files over.
i.e.
scp -r -i /path/to/private_key /local/path/to/files root@1.2.3.4:/path/on/droplet
-r specifies recursive transfer, meaning all files and directories.
-i specifies the private key file using a direct path to its location.
/local/path/to/files is the local path to the files to transfer
root@1.2.3.4:/path/on/droplet
Where root is the username of the user you’re logging in as, 1.2.3.4 is the IP of your Droplet, and the /path/on/droplet is where the files should be uploaded.
…
If you’re not on a Mac, you can use PuTTy’s pscp
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
…
Alternatively, you could simply use SFTP. You can login as root to transfer files, though you’d most likely need to set permissions on the files as you really don’t want files and directories for your app to be owned by root unless it’s absolutely required for one reason or another.
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.