Skip to content

Linux VPS & VPS Windows Setup Guide | NetCloud24 and Use SFTP on Windows VPS

Netcloud24
Cloud Infrastructure Expert
NetCloud24 Expert Guides Open the dedicated video page

Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud. Cloud and VPS expertise, security, performance, and step-by-step tutorials. Learn, deploy, and keep building with NetCloud24.

 

Introduction

SFTP (SSH File Transfer Protocol) is a secure method for transferring files over a network. In this guide, we will show you how to install and configure an SFTP server on a , allowing you to securely upload and download files.

Step 1: Install OpenSSH Server on Windows VPS

Windows VPS10 and newer versions include the OpenSSH Server feature, which you can enable to set up SFTP. Follow these steps:

  1. Open Settings on your Windows VPS.
  2. Go to Apps > Optional Features.
  3. Scroll down and click on Add a feature.
  4. Search for OpenSSH Server, select it, and click Install.

Step 2: Start and Configure OpenSSH Server

    1. After installation, open PowerShell with administrative privileges.
    2. Start the SSH server by running the following command:
Start-Service sshd
    1. To ensure the SSH server starts automatically with Windows, run:
Set-Service -Name sshd -StartupType 'Automatic'
    1. Next, confirm that the firewall allows SSH traffic:
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Protocol TCP -Action Allow -LocalPort 22

Step 3: Configure SFTP (Optional)

If you want to restrict SFTP users to specific directories or configure other advanced options, you can modify the SSH configuration file:

Visual overview of Linux VPS & VPS Windows Setup Guide | NetCloud24 and Use SFTP on Windows VPS
Visual overview: Linux VPS & VPS Windows Setup Guide | NetCloud24 and Use SFTP on Windows VPS
    1. Navigate to the OpenSSH configuration file, typically located in C:\ProgramData\ssh\sshd_config.
    2. Edit the file to configure your preferences. For example, you can restrict users to their home directories by adding:
Subsystem sftp sftp-server.exe
Match Group sftp
    ChrootDirectory C:\Users\%u
    ForceCommand internal-sftp
    AllowTcpForwarding no
    1. Save the file and restart the SSH service:
Restart-Service sshd

Step 4: Connect to the SFTP Server

Once OpenSSH is configured, you can connect to the SFTP server using any SFTP client. Here’s how:

  1. Open your preferred SFTP client (e.g., FileZilla, WinSCP, or Cyberduck).
  2. Enter the following connection details:
    • Host: Your VPS’s IP address or domain name.
    • Port: 22 (the default SSH port).
    • Username: Your Windows VPS username (e.g., Administrator).
    • Password: Your Windows VPS password.
  3. Click Connect to establish the SFTP connection.

Step 5: Upload and Download Files Using SFTP

Once connected, you can securely upload and download files between your local computer and the .

  1. To upload files, drag them from your local machine’s file manager to the SFTP client window.
  2. To download files, drag them from the SFTP client window to your local file manager.

Step 6: Troubleshooting

If you encounter any issues with SFTP, consider the following troubleshooting tips:

  • Ensure the SSH service is running by executing Get-Service sshd in PowerShell.
  • Verify that the firewall allows traffic on port 22.
  • Check the sshd_config file for any misconfigurations.

Conclusion

You have successfully installed and configured SFTP on your . You can now securely transfer files to and from your server using SFTP. For more advanced features, consult the official OpenSSH documentation or your SFTP client’s user guide.

Key topics covered in Linux VPS & VPS Windows Setup Guide | NetCloud24 and Use SFTP on Windows VPS
Key topics covered in this NetCloud24 guide.

© 2024. For more Windows VPS solutions, visit NetCloud24.

Linux VPS & VPS Windows Setup Guide | NetCloud24 and Use SFTP on Windows VPS
Linux VPS & VPS Windows Setup Guide | NetCloud24 and Use SFTP on Windows VPS
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.