Use SFTP when you want an interactive or graphical transfer, SCP for a quick one-time copy, and rsync for deployments that repeat. All three use SSH encryption, but they differ in navigation, synchronization, and the risks of copying or deleting the wrong files.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Before running any command, collect the VPS IP address, login username, authentication method, destination directory, and the local folder that actually contains your deployable website. Test SSH access and verify the server fingerprint first; a successful file-transfer command is not useful if it writes into the wrong web root or connects to an untrusted host.
As an Amazon Associate I earn from qualifying purchases.
Choose the transfer method first
The right tool depends on whether this is a one-off upload or an ongoing deployment. The table below summarizes the practical differences.
| Method | Best use | Useful controls | Main caution |
|---|---|---|---|
| SFTP | Interactive work, occasional uploads, or a graphical client | -i for a private key, -P for a custom port, -r for a directory, and interactive put |
You must navigate and repeat operations manually for each deployment |
| SCP | A fast, one-time file or directory copy | -i, capital -P, recursive -r, and -p to preserve times and modes |
It has fewer convenient controls for incremental synchronization |
| rsync | Repeated directory deployments and synchronization | Archive mode, compression, dry runs, include/exclude rules, and optional deletion | A wrong source path or careless --delete can remove files from the VPS |
All three can transfer over an SSH connection. Since OpenSSH 9.0, the scp command uses the SFTP protocol by default, although its command-line behavior and path semantics remain those of SCP.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
What you need before uploading
A transfer requires more than an IP address. Prepare these items before opening a terminal:
- A running VPS and reachable IP address. Confirm that the server is powered on and that its firewall or cloud security group permits SSH on the configured port.
- A login username. Use the account intended for deployment rather than assuming that a particular distribution always uses the same administrator name.
- Authentication. You need an SSH private key, a password, or another method enabled on the server. SSH keys are preferable for routine administration; protect the private-key file and do not upload it with the website.
- The actual web-root or deployment directory. Paths differ with the operating system, web server, control panel, container, and hosting image. Do not assume that
/var/www/htmlis correct. - Write permission. The remote account must be able to create or replace files in that directory, or you need a controlled deployment procedure that stages files and then changes ownership.
- A local deployable copy. If the project uses a build step, identify the generated output directory, such as
distorbuild, separately from source code, dependencies, and development configuration.
DigitalOcean’s SSH documentation describes the connection inputs as the server address, username, and authentication method and recommends SSH keys. The same requirements apply to another VPS provider using OpenSSH.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Test SSH access and verify the host
Start with an SSH login instead of attempting a transfer immediately:
ssh -i ~/.ssh/id_ed25519 [email protected]
If your server listens on a non-default port, add the capital -p option to ssh, for example -p 2222. DigitalOcean’s documented basic form is ssh [email protected]; use -i /path/to/private/key when a specific key is required.
Check the fingerprint on first connection
On a first connection, SSH displays the server’s host-key fingerprint. Compare it with a fingerprint supplied through a trusted administrative channel before accepting it. This check binds the name or IP address to the server key you expect and helps detect a man-in-the-middle attack.
Treat a changed-key warning as an investigation
If SSH reports that the host identification has changed, do not immediately delete the old entry and continue. A rebuild that reuses the same IP can legitimately produce a new key, but an unexpected change can indicate interception. Confirm the rebuild or replacement with the provider or administrator, verify the new fingerprint, and only then update the local known_hosts entry.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteConfirm the remote account and location
After logging in, run:
whoami
pwd
ls -la
These commands show which account you are using, its current directory, and the files visible there. Locate the configured web root from the web server’s site configuration or the hosting image documentation. If the destination is absent, ask whether the site should be created there or staged elsewhere; creating an arbitrary directory will not make the web server serve it.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Method 1: upload with SFTP
SFTP is a file-transfer program that performs operations over an encrypted SSH transport. It provides an interactive prompt, supports private-key selection, and can upload directories recursively. It does not follow symbolic links while recursively traversing a directory.
Open an SFTP session
sftp -i ~/.ssh/id_ed25519 [email protected]
Use -P with a capital letter for a non-standard SFTP port:
sftp -P 2222 -i ~/.ssh/id_ed25519 [email protected]
At the sftp> prompt, the pwd command shows the remote working directory and lpwd shows the local one. Use cd to change the remote directory and lcd to change the local directory.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Upload a complete site directory
sftp> cd /var/www/site
sftp> put -r ./site
sftp> bye
The -r option recursively copies the local directory. This example creates a remote site directory inside the destination. If you want the contents of a local folder rather than an additional folder level, change the local directory first and upload its contents individually, or use an explicit file list. Verify the result on the server instead of relying on the prompt alone.
Upload one file
sftp [email protected]:/var/www/site/index.html
sftp> put index.html
The destination in an SFTP command can use the form [user@]host[:path]. A single-file upload is useful for a small correction, but it can leave a site with mixed versions if related assets also changed.
Useful interactive commands
lslists remote files;llslists local files.mkdir namecreates a remote directory when your account has permission.get filedownloads a file for a backup or inspection.put fileuploads one local file.put -r directoryuploads a directory recursively.byeorexitcloses the session.
Use a graphical SFTP client
For users who prefer a file manager, DigitalOcean recommends FileZilla for newer users. Configure the VPS IP address as the host, port 22 unless you changed it, the SSH username, and the private key. After connecting, the local pane displays your computer and the remote pane displays the VPS. Select the intended local files and choose Upload. Confirm the remote path before starting; a GUI can make it easy to drop files into the account’s home directory instead of the web root.
Method 2: upload with SCP
SCP is suited to a quick copy between hosts over SSH. It is concise for a one-time upload and works well in scripts that do not need synchronization logic.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Copy a directory recursively
scp -i ~/.ssh/id_ed25519 -r ./site [email protected]:/var/www/site
-r is required for a directory. Specify the private key with -i. For a custom SSH port, use capital -P, not the lowercase option used by some unrelated commands:
scp -P 2222 -i ~/.ssh/id_ed25519 -r ./site [email protected]:/var/www/site
Copy one file and preserve metadata
scp -p -i ~/.ssh/id_ed25519 ./site/index.html [email protected]:/var/www/site/
The -p option asks SCP to preserve modification times and modes. Metadata preservation does not grant permissions that the remote account lacks, and web-server ownership may still need to be corrected on the VPS.
Understand the trailing-slash behavior
Whether you write ./site or ./site/ affects the source semantics. One form can place the directory itself at the destination, while the other copies its contents. Because an unintended extra level can produce a broken URL such as /site/index.html instead of /index.html, inspect the destination after every first-time command. Use an explicit destination path and test the resulting index file.
Account for symbolic links
SCP follows symbolic links during recursive copying, unlike SFTP. A link can therefore copy the linked target’s contents or traverse outside the directory you intended. Inspect links with find ./site -type l -ls before a recursive copy, especially when a build directory contains links to shared assets.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteKnow what OpenSSH 9 changed
The Debian OpenSSH scp(1) manual states: “Since OpenSSH 9.0, scp has used the SFTP protocol for transfers by default.” This improves the protocol used underneath, but it does not turn SCP into an incremental synchronizer. You still select the source and destination for each invocation.
Method 3: synchronize with rsync
Use rsync when deployments repeat and the goal is to synchronize a directory rather than perform an isolated copy. DigitalOcean lists rsync alongside OpenSSH SFTP and SCP as a command-line transfer tool. Its archive and comparison behavior can avoid retransferring unchanged files, while compression can reduce transfer size on slower links.
Start with a safe synchronization command
rsync -avz ./site/ [email protected]:/var/www/site/
Here, -a enables archive-style recursion and metadata handling, -v shows activity, and -z compresses data in transit. The trailing slash on ./site/ means “copy the contents of this directory.” The trailing slash on the remote path makes the intended directory explicit.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Preview before changing the VPS
rsync -avz --dry-run ./site/ [email protected]:/var/www/site/
A dry run lists additions, updates, and deletions without applying them. Review the list for an accidental source path, an unexpected nested directory, or generated files that should not be published. The exact output and option behavior depend on the rsync version installed locally and remotely, so consult that version’s manual when using advanced filters.
Use deletion only with a backup plan
rsync -avz --delete ./site/ [email protected]:/var/www/site/
--delete removes remote files that are absent from the local source. That is useful when the local build is the complete source of truth, but dangerous when the destination contains uploads, logs, environment files, or another deployment’s assets. Keep a backup, run --dry-run first, and exclude files that must remain on the server. A typo such as syncing an empty directory can otherwise remove a live site.
Use a non-standard SSH port
rsync -avz -e 'ssh -p 2222' ./site/ [email protected]:/var/www/site/
The -e option tells rsync which remote-shell command to use. Add the same identity option when necessary:
rsync -avz -e 'ssh -p 2222 -i ~/.ssh/id_ed25519' ./site/ [email protected]:/var/www/site/
Exclude development and private files
Synchronize the generated public directory rather than the entire project whenever possible. If exclusions are needed, express them explicitly and preview the result:
Free tools Windows power users keep installed
One-click scans. No signup required.
rsync -avz --dry-run --exclude '.git/' --exclude '.env' ./site/ [email protected]:/var/www/site/
Never put private keys, production secrets, local dependency caches, or source-control metadata into a public web root. Exclusion patterns are part of the deployment policy; document them beside the command so another administrator does not remove them accidentally.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.A reliable deployment workflow
The safest process separates building, transferring, and activating the site.
- Build locally. Run the project’s documented production build and identify the output directory. Check that the generated index file and referenced assets are present.
- Check the destination. Log in with SSH, confirm the account, inspect the web-server configuration, and verify that the destination is writable or that a staging directory is available.
- Choose the transfer. Use SFTP for interactive selection, SCP for a small one-off copy, or rsync for a repeatable folder deployment.
- Preview where possible. Use an rsync dry run or inspect the exact SFTP/SCP destination before sending files.
- Transfer to a staging directory when downtime matters. Upload the complete build outside the live directory, check it, and switch the web-server configuration or release symlink using your established process.
- Check ownership and permissions. Ensure the web-server account can read files and traverse directories. Avoid making the entire tree world-writable.
- Test the public site. Request the HTTPS URL, open representative pages, and inspect browser and server logs for missing assets or permission errors.
Verify the upload on the VPS
After a transfer, reconnect with SSH and inspect the exact path:
Best Value
ls -la /var/www/site
find /var/www/site -maxdepth 2 -type f | sort
Confirm all of the following:
- The expected index file is at the path the web server serves, not one directory deeper.
- CSS, JavaScript, images, fonts, and other static assets exist with the names and capitalization referenced by the HTML.
- Directories are searchable and files are readable by the web-server user.
- Ownership is appropriate for the deployment model; a file owned by the wrong account can block later updates or web-server access.
- The site responds over HTTPS and redirects behave as expected.
- Browser and server logs do not show 404, 403, or permission-denied errors.
If the site uses a service worker or a content-delivery cache, first confirm that the new files are correct on disk. Only then purge or version caches; clearing a cache cannot fix a missing or incorrectly named file on the VPS.
Troubleshooting common failures
Permission denied during upload
Check the remote path and the account with whoami. The account may be able to log in but not write to the web root. Upload to a directory it owns, then use a controlled administrator step to move files and set ownership. Do not solve the problem by recursively granting broad write permission to a public directory.
Connection timed out or refused
Verify the VPS IP, SSH port, server state, and firewall rules. A non-standard port must be supplied consistently to SSH, SFTP, SCP, and rsync. If ordinary SSH cannot connect, file-transfer commands will fail too.
No such file or directory
Inspect both sides of the command. In SFTP, use lpwd and pwd; in a shell, use ls -la ./site and check the remote path over SSH. Relative local paths are resolved from the directory where you started the command.
The site shows a directory listing or 404
Look for an extra directory level caused by source and trailing-slash semantics. Confirm that the web server’s configured root matches the directory you populated and that the index filename matches its configuration. Case differences in filenames are significant on typical Linux filesystems.
Recommended Free Tools
Files are present but the browser gets 403
Check ownership, file modes, parent-directory execute permission, and any web-server access rules. A transfer can preserve a mode that is unsuitable for the serving account, particularly when SCP’s -p option is used.
rsync wants to delete unexpected files
Stop and rerun with --dry-run without --delete. Check whether you selected the wrong local directory, omitted a trailing slash, or failed to exclude server-managed files. Restore from a backup if a deletion was already applied; do not assume rsync can reconstruct files that were never in the local source.
SSH reports a changed host key
Pause the deployment and verify whether the VPS was rebuilt or reassigned. Confirm the new fingerprint through a trusted channel before editing known_hosts. Treat an unexplained change as a possible security incident.
Old content remains after a successful upload
Compare the file on disk with the local build, then inspect browser cache, service-worker cache, and any CDN layer. Purge or version those caches only after the VPS contains the intended files.
Security and maintenance practices
- Use a dedicated deployment account with only the access it needs.
- Prefer SSH keys, protect private keys with a passphrase, and never place them in the website directory.
- Verify host fingerprints on first connection and investigate changes.
- Keep production secrets outside the public web root and exclude them from rsync.
- Preview destructive synchronization and maintain recoverable backups.
- Record the destination path, SSH port, exclusions, and ownership procedure so future deployments are repeatable.
- Test a small non-production deployment when changing SSH, web-server, or filesystem settings.
Which command should you use?
Choose SFTP if you need to browse directories, select individual files, or use a graphical client. Choose SCP when the source and destination are known and you need a simple one-time copy. Choose rsync when the same site is deployed repeatedly and you want previews, exclusions, compression, and synchronization behavior. Whichever method you select, the critical safeguards are the same: verify the host, confirm the destination, transfer the correct build output, check permissions, and test the live URL.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

