one liner for sftp to put files into remote sftp server from local Linux directory
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!
Hi @sandyaquashark,
You can use scp or rsync to achieve this.
The SCP command will look like this
- scp -rp /path/to/local/dir root@Droplet-IP:/path/to/remote/dir
The Rsync command will look like this:
- rsync -a ~/dir1 username@remote_host:destination_directory
More about Rsync you can find here https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories
Hello @sandyaquashark
I’ll also recommend using rsync instead of sftp or scp . The thing is rsync is likely to complete each transfer two times faster than the other protocol.
Also rsync can be used in strict mode and other options can be applied to encrypt traffic and make sure no one can sniff the transfer.
Regards
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.