Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

How to connect a Linux server using WinSCP?

What is WinSCP?

WinSCP (Windows Secure Copy) is a free tool for Windows computers. It helps you move files securely between your computer and other computers/servers. You can use it to connect to Linux servers using different ways like SFTP, FTP, SCP, and WebDAV.

 

Winscp Can Transfer Files Using Five Different Methods

 
  • SFTP (SSH File Transfer Protocol): This is a secure way to move files over the internet. It uses encryption to protect your files as they're transferred.
  • FTP (File Transfer Protocol): FTP is a common way to send files between computers, but it's not as secure as SFTP because it doesn't use encryption.
  • SCP (Secure Copy Protocol): SCP lets you copy files between computers securely. It uses SSH to keep your files safe during the transfer.
  • WebDAV (Web Distributed Authoring and Versioning): This extends the internet's capabilities to allow you to work on files remotely. It offers features like locking files and keeping track of different versions.
  • S3 (Amazon S3): This is an Amazon service that lets you store and manage your files in the cloud. It's useful for storing large amounts of data and accessing it from anywhere.

Each method has its own strengths and weaknesses, so you can choose the one that best fits your needs for security, compatibility, and features when transferring files.

 

Things You Need Before You Start

 
  • The details to access the Linux server: this includes the server's address, your username, password, and the port number.
  • You should have a .pem file if you want to use the key pair method to connect to the Linux server. (If you have a Linux VPS from Accuwebbhosting.com, you won't receive a .pem file. Instead, you have to create a key pair using puttygen. Then, you'll need to add the public key to the authorized key file on your Linux VPS.)
  • You should have WinSCP installed on your Windows computer. You can get it for free from the official WinSCP website:

Steps to Connect to a Linux Server using WinSCP

There are two ways to connect to the Linux server using WinSCP. We'll explain both methods in detail so you can choose the one that suits your needs.

1. Use a password to connect to a Linux server

2. Use a Key Pair to Connect to a Linux Server

 

1. Use a password to connect to a Linux server

If you want to connect to the Linux Server using a password, follow these steps:

Step 1: After installing WinSCP on your Windows computer, open the application from the Start menu or desktop shortcut.

 

 

Step 2: Go to Tabs -> New Tab -> Remote Tab to open the Login Window. You can also press Ctrl+N. You might have a session tab if you're using an older version of WinSCP.

 

 

Step 3: In the "Login" tab, enter the following details:

 
  • File Protocol: Choose SFTP, SCP, or FTP.
  • Host Name: Type the IP address or hostname of your Linux server.
  • Port Number: If needed, enter the port (default is 22 for SSH).
  • User Name: Provide your username for the Linux server.

You can also save the session for later use by giving it a name and clicking "Save."

 

 

Step 4: Click the "Login" button to connect. WinSCP might ask you to accept the server's SSH key if it's your first time. Click "Yes" to continue.

 

 

Step 5: Once authenticated, WinSCP will connect to your Linux server and show its directory structure in the remote panel (Right Side).

 

 

In Winscp, There Are Two Main Panels:

Local System Folders and Files Window: This shows the files on your Windows computer. You can select files and folders to upload to the server.

Remote Server Folders and Files Window: This displays the files on the Linux server. You can select files to download to your computer and perform other file operations like copying, moving, renaming, and deleting.

You can navigate directories, view files, and perform file operations like upload and download by dragging and dropping between the local and remote panels.

 

2. Use a Key Pair to Connect to a Linux Server

Important Note: If you have a Linux VPS from Accuwebbhosting.com, you won't receive a .pem file. Instead, you have to create a key pair using puttygen. Then, you'll need to add the public key to the authorized key file on your Linux VPS.

If you want to connect using a key pair, follow these steps:

Step 1: Create a key pair for the Linux server in your Windows system. You can use Puttygen to generate a key pair for the Linux server.

Step 2: Configure the key pair in WinSCP. Open WinSCP and go to Advanced Settings.

 

 

Then, choose SSH > Authentication. Click to select the private key file in .pem format that you have saved on your computer.

 

 

If the file is not found, select "All Private Key Files" to view all private key files. Then, click OK to convert the key file to PuTTY format.

Once the key file is converted, click OK to save the settings.

Step 3: We need to connect to the Linux server. In WinSCP, enter the server's IP address, port number (usually 22), and username. If you're using a key pair, you don't need to enter a password. Click Login to connect to the server.

 

 

If it's your first time, WinSCP might ask you to accept the server's SSH key. Click "Yes" to continue.

Once connected, you can manage files between your computer and the Linux server.

 

Conclusion

Connecting to a Linux server from a Windows computer with WinSCP is easy. By following these steps, you can securely transfer files using protocols like SFTP, SCP, or FTP. Whether you're a system administrator, developer, or casual user, WinSCP offers a reliable and user-friendly way to manage file transfers between Windows and Linux environments.


Was this answer helpful?

« Back

chat