iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Fix SFTP by identifying the layer that fails instead of changing permissions at random. SFTP runs through SSH, so a failed transfer can originate in DNS or TCP reachability, SSH authentication, sshd_config, the SFTP subsystem, a chroot jail, or ordinary filesystem permissions. Test those layers in that order, validate configuration with sudo sshd -t before any restart, and use the VPS provider’s serial console if normal SSH access is unavailable.
Start by locating the failing layer
The client message is often too generic to identify the cause. A GUI may show only “connection failed,” while the server log distinguishes a blocked port, a rejected key, a malformed subsystem declaration, a chroot ownership violation, or a denied file operation. Use the symptom and the point at which the session stops to choose the next test.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →| Failure layer | Typical symptom | Evidence to collect | Where to work |
|---|---|---|---|
| Network reachability | Hostname does not resolve, TCP connection times out, or the port is refused | DNS result, TCP test, VPS firewall and security-group rules, routing and provider status | Client, VPS firewall, provider control panel |
| SSH authentication | Password or key is rejected before an SFTP prompt appears | sftp -vvv output and the server authentication log |
Username, key files, account policy and SSH logs |
| SSH configuration or subsystem | SSH may work, but SFTP exits immediately or never starts | sudo sshd -t result, effective SSH settings and service journal |
/etc/ssh/sshd_config, included files and the SFTP subsystem |
| Chroot policy | Login is refused with a bad ownership or modes message | Ownership and mode of every component of the chroot path | Chroot root, parent directories and the writable child directory |
| Filesystem or ACL | SFTP login succeeds but listing, uploading, renaming or deleting returns Permission denied |
Effective path inside the jail, owner, group, mode and ACL of the target directory | Target directory and its parent path |
Do not jump to the chroot or file permissions when the TCP port is unreachable. Conversely, changing a firewall rule will not repair a key that the SSH daemon has rejected.
Keep a recovery path before editing SSH
SSH configuration errors can lock out every normal session. Confirm that you have one of these routes before making changes:
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
- An existing root or administrative SSH session that you will keep open while testing.
- A VPS provider console that gives direct access to the machine.
- A provider serial console. AWS documentation specifically recommends serial-console access for boot, network and SSH configuration recovery when ordinary access is impaired.
If you lose SSH after an edit, use the console to correct the file, validate it, and restart the service locally. Treat every change as reversible: change one setting, test it, and retain the previous value until a successful login and transfer have been confirmed.
1. Prove DNS and TCP reachability
Resolve the VPS address
Check that the hostname resolves to the intended VPS address. A stale record, an IPv4/IPv6 mismatch or a typo can look like an SFTP problem even though no SSH connection is being attempted. If the address is wrong, correct DNS or use the current address supplied by the VPS provider.
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 the SSH port
SFTP normally uses the SSH port, commonly 22 but potentially a custom value. Test that exact port from the client. For example, use a TCP test such as nc -vz host.example 22, replacing the host and port with your values. A timeout usually points to routing, a provider security-group rule, a VPS firewall or an offline service. A refusal means the host is reachable but nothing is accepting that port, or a firewall is actively rejecting it.
When the test fails, inspect the VPS provider’s network or security-group rule, the operating-system firewall, routing and the provider status page before changing SFTP settings. Once TCP reaches the SSH daemon, move to authentication diagnostics.
2. Reproduce the failure with server-side evidence
Use verbose OpenSSH output
Run the OpenSSH client at maximum diagnostic verbosity:
sftp -vvv user@host
Specify the actual port and key when needed, for example by adding the client’s normal port and identity options. Record the last successful stage and the exact server message. The output shows whether the client resolved the address, completed the TCP and SSH handshakes, offered a key, authenticated, started the subsystem and began file operations.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
Read the authentication log and service journal
On many Debian-family systems, authentication messages are in /var/log/auth.log. On many RHEL-family systems, they are in /var/log/secure. Also inspect the SSH service journal for daemon-start failures and subsystem errors. Correlate the timestamp of one test attempt with the server record. A client’s “connection failed” label is not a root cause; the server-side record is normally more specific.
Microsoft’s OpenSSH guidance likewise directs administrators to inspect authentication and system events. Its Windows-specific path uses Event Viewer rather than the Linux log files above, so use the logging system provided by the VPS image.
3. Repair public-key authentication failures
Confirm the connection identity
Verify all of the values the client is actually using:
- The VPS address resolves to the intended machine.
- The username is the account whose key you installed.
- The port is the SSH port configured on the VPS.
- The private key selected by the client matches the public key installed on the server.
A key can be perfectly valid and still be rejected when it is offered for the wrong username or host.
Crashes, 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 minutePC 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 & 11Check the authorized-keys location and permissions
Confirm that the public key is present in the account’s authorized-keys file, or in the provider-documented location when the image uses a nonstandard path. Check the file’s ownership and mode and the ownership and mode of the parent home directory. SSH must be able to read the file, while untrusted users must not be able to replace or modify it.
Use the server log to distinguish a key rejection from a later filesystem denial. A message such as “server refused our key” occurs during authentication; a successful login followed by Permission denied is a filesystem or ACL issue and requires a different fix.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Review account and algorithm policy
Inspect any AllowUsers, AllowGroups or Match rules that apply to the account. A broad rule near the top of sshd_config can be overridden or narrowed by a later conditional block. Accepted public-key algorithms also matter, particularly on older deployments. If the server log identifies an algorithm mismatch, use a key type and algorithm permitted by that OpenSSH version and its security policy rather than weakening the policy indiscriminately.
4. Validate sshd_config before restarting
Always test syntax first:
sudo sshd -t
A clean return means the configuration parses. It does not prove that a referenced path exists, that a package is installed, that permissions are safe, or that the selected policy will allow the account. A syntax error must be fixed before a restart; otherwise the daemon may fail to start and remove your remaining network access.
After syntax validation, inspect the effective configuration for the affected account and source address with the OpenSSH tools available on your image. Pay particular attention to conditional Match blocks, because they can change authentication, chroot and subsystem behavior for only the SFTP user.
Check the SFTP subsystem declaration
There must be a working Subsystem sftp definition. It can invoke an installed external sftp-server binary or use the built-in internal-sftp implementation. A misspelled path, missing package or invalid option can let SSH start while SFTP sessions fail.
For a chrooted account, an internal-sftp configuration is often simpler because it does not require an external binary inside the jail. Red Hat documents this advantage. The OpenSSH manual documents subsystem options for a start directory, logging facility, log level and request restrictions; apply only options supported by the OpenSSH version on your VPS.
5. Fix chroot ownership and modes safely
Understand the security rule
OpenSSH checks the ownership and mode of the chroot path and each parent component. The chroot root must be owned by root and must not be writable by the SFTP user. If any component is writable in an unsafe way, the daemon rejects the session with an error such as fatal: bad ownership or modes for chroot directory component. SFTP Gateway describes this restriction as a deliberate security measure: OpenSSH does not allow SFTP users write access to their chroot directory.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Create a non-writable jail and writable child
For an account named alice and a group named sftp-users, a typical layout is:
sudo chown root:root /srv/sftp/alice
sudo chmod 755 /srv/sftp/alice
sudo mkdir -p /srv/sftp/alice/uploads
sudo chown alice:sftp-users /srv/sftp/alice/uploads
sudo chmod 750 /srv/sftp/alice/uploads
Adjust the paths, group and modes to the distribution’s policy. The important design is that the jail root remains root-owned and non-writable, while a child directory is owned by the SFTP account or its permitted group. Do not make the chroot root writable as a quick fix; that trades a startup error for a weaker isolation boundary.
Check every parent component
Inspect /srv, /srv/sftp and /srv/sftp/alice, not only the final directory. A writable or incorrectly owned parent can trigger the same rejection. Keep traversal permission for the account while preserving ownership and write restrictions required by the daemon.
6. Use the path the SFTP user actually sees
After a successful chrooted login, the jail becomes the SFTP user’s root directory. If the configuration contains ChrootDirectory /srv/sftp/%u, user alice sees the host directory /srv/sftp/alice as /. The upload directory in the example is therefore /uploads, not /srv/sftp/alice/uploads.
This mapping explains many “the directory does not exist” and “permission denied” reports. In the client, browse to /uploads. In server-side commands, continue using the full host path. Microsoft recommends providing a writable directory inside the chroot and, where appropriate, setting a start directory with SFTP subsystem options.
7. Separate login success from file-operation permissions
A user can authenticate successfully and still be unable to upload. Once the session is established, check the owner, group, mode and any ACL on the directory named by the client. The account needs write and execute permission on the upload directory and execute permission on each parent it must traverse. It does not need write permission on the chroot root.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
- If listing fails, check read and execute permission on the directory.
- If upload fails, check write and execute permission on the destination directory and available storage.
- If rename or delete fails, check write and execute permission on the containing directory; those operations are controlled by the directory, not only by the file’s mode.
- If only some paths fail, compare their ownership, group membership and ACLs instead of changing the entire jail.
Use the server log to verify that the request reached the filesystem stage. Do not “fix” a post-authentication denial by weakening key-file or chroot permissions.
8. Increase SFTP logging for one controlled retest
Raise the OpenSSH or SFTP log level temporarily, reproduce one failed login or transfer, and then return to the normal level. DEBUG3 is an example of a high diagnostic level where the installed version supports it. Excessive debug logging can expose connection details and create large logs, so leave it enabled only for the short reproduction window.
For Linux, use the authentication log or service journal and the logging method supported by the selected subsystem. Red Hat documents verbose SFTP command logging and notes that an external sftp-server in a chroot may require access to /dev/log; internal-sftp changes that deployment requirement. For Windows OpenSSH, Microsoft documents enabling SFTP logging and checking the generated log location, while Event Viewer provides related system events.
9. Recover when normal SSH is unavailable
Use the VPS provider’s serial console when a bad SSH configuration, firewall rule or network setting prevents ordinary access. This out-of-band route is especially valuable because it does not depend on the failing SSH path.
- Open the provider console and log in with a local administrative account.
- Inspect the SSH configuration and recent service or authentication messages.
- Correct the smallest possible error, such as a malformed
Subsystem sftpline or an unintendedMatchrule. - Run
sudo sshd -tlocally and require a clean result. - Restart or reload the SSH service using the service manager for the VPS image.
- Retest from a separate client session before closing the console.
If the daemon will not start, keep the console session open while correcting the configuration. Do not rely on a remote restart command when you have not first proved that the new configuration parses.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsCommon failure patterns and the precise fix
| What you observe | Most useful next check | Appropriate remedy |
|---|---|---|
| TCP port test times out | Provider security-group rule, VPS firewall, routing and provider status | Restore network reachability; do not edit SFTP permissions yet |
| SSH reaches the host but the key is refused | Username, selected private key, authorized-keys path, file ownership and account policy in the server log | Install the matching public key in the correct account location or correct the policy and permitted algorithm |
| SSH works but SFTP closes immediately | sudo sshd -t, Subsystem sftp path or internal-sftp options, service journal |
Fix syntax, install or reference the correct subsystem, then validate before restarting |
| Login reports bad chroot ownership or modes | Owner and mode of every chroot parent and the jail root | Make the jail root root-owned and non-writable; create a writable child directory |
| Login succeeds but upload is denied | Client-visible path, destination owner/group/mode and ACL | Use the path inside the jail and grant write permission only on the intended child directory |
| Only a conditional account fails | Applicable Match, AllowUsers and AllowGroups rules |
Correct the rule that applies to that user, then test the effective configuration |
Security and change-control checklist
- Keep the chroot root owned by root and remove user write access from it.
- Place uploads in a child directory with the narrowest owner, group and mode that meets the workflow.
- Protect the authorized-keys file and its parent directory so the account or another user cannot replace keys.
- Prefer a targeted policy correction over globally allowing a weaker key algorithm or opening an unnecessary network port.
- Validate every SSH configuration edit with
sudo sshd -tbefore reload or restart. - Increase logging only for a controlled reproduction and restore the normal level afterward.
- Record which layer failed, what evidence proved it, and which change restored service; this prevents repeating unrelated permission changes.
Distribution and version caveats
Commands, package names, service names, firewall tools, log paths and accepted key algorithms vary by distribution and OpenSSH version. The Linux paths in this guide are common examples, not universal locations. Microsoft’s documentation targets Windows OpenSSH, while the chroot and log guidance from Red Hat and OpenSSH applies to particular Linux deployments. Check the documentation and service layout of the VPS image before applying a command, and confirm that subsystem options are supported by its installed OpenSSH version.
The shortest reliable path is therefore: prove the port is reachable, reproduce with sftp -vvv, correlate the attempt with server logs, validate sshd_config, repair authentication or subsystem settings, enforce a root-owned chroot with a writable child, and test the effective path and filesystem permissions from inside the jail.
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.

