{"id":22178,"date":"2021-10-10T08:02:15","date_gmt":"2021-10-10T08:02:15","guid":{"rendered":"https:\/\/ded9.com\/?p=22178"},"modified":"2025-12-20T07:24:19","modified_gmt":"2025-12-20T07:24:19","slug":"what-is-winscp-and-how-to-connect-to-your-linux-server-by-winscp","status":"publish","type":"post","link":"https:\/\/ded9.com\/de\/what-is-winscp-and-how-to-connect-to-your-linux-server-by-winscp\/","title":{"rendered":"What Is WinSCP and How to Connect to Your Linux Server With It"},"content":{"rendered":"<p><span data-preserver-spaces=\"true\">If you use Windows on your local computer, as you work with remote\u00a0<\/span><a class=\"editor-rtfLink\" href=\"https:\/\/ded9.com\/what-is-the-difference-between-windows-and-linux-server\/\" target=\"_blank\" rel=\"noopener\"><span data-preserver-spaces=\"true\">Linux<\/span><\/a><span data-preserver-spaces=\"true\"> servers, you occasionally need to transfer files between these two points. Fortunately, all popular Linux distributions come pre-configured on Alibaba Cloud Elastic Compute Service (ECS) instances with an SSH daemon, which includes support for secure file transfers through <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/SSH_File_Transfer_Protocol\" target=\"_blank\" rel=\"noopener\"><span data-preserver-spaces=\"true\">SFTP<\/span><\/a><span data-preserver-spaces=\"true\">. SFTP is an acronym for SSH (or Secure) File Transfer Protocol. Since the ECS instance already includes an SFTP server, we need an SFTP client to connect to it. In this tutorial, we will learn how to use WinSCP, a client application that supports various transfer protocols such as FTP, SFTP, <\/span><a class=\"editor-rtfLink\" href=\"https:\/\/en.wikipedia.org\/wiki\/WebDAV\" target=\"_blank\" rel=\"noopener\"><span data-preserver-spaces=\"true\">WebDAV<\/span><\/a><span data-preserver-spaces=\"true\">, S3, etc.<\/span><\/p>\n<h2><span data-preserver-spaces=\"true\">What is WinSCP?<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">WinSCP (Windows Secure Copy) is an open-source GUI tool for securely transferring\/editing files from MS Windows to<\/span><span data-preserver-spaces=\"true\"> a remote computer<\/span><span data-preserver-spaces=\"true\">, typically a Linux computer. The destination computer must be running an FTP or SFTP server.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">This quick guide will teach us how to connect it to a remote Ubuntu 16.04 server.<\/span><\/p>\n<h2><span data-preserver-spaces=\"true\">How to Install WinSCP<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">Click on the following link to visit WinSCP&#8217;s download page. Scroll down until you find the link to the executable for setup. After the download has finished, run the installer.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">We will do a <\/span><strong><span data-preserver-spaces=\"true\">typical installation<\/span><\/strong><span data-preserver-spaces=\"true\"> here since we want all the many small files and support for selectively reading file blocks in an interface style. Two panels, side by side, allow a faster and more efficient workflow than the &#8220;Explorer&#8221; style<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Click on\u00a0<\/span><strong><span data-preserver-spaces=\"true\">Next &gt;<\/span><\/strong><span data-preserver-spaces=\"true\"> until the setup is complete. Instead of the name interface, the install wizard explains each step well.<\/span><\/p>\n<h2><span data-preserver-spaces=\"true\">Set Up Connection to SFTP Server<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">When you first open WinSCP, the login manager will appear, where you can fill in the connection details to your Alibaba Cloud ECS instance(s).<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Depending on how you&#8217;ve set up your instance, the login method will be identical to the one you&#8217;re currently using to connect with your SSH client (such as PuTTY), either with a username and Password or a username and private key.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">In the next section, you&#8217;ll learn that usernames are in the input fields to log in with a username and a Password. If you log in with a private key, you must fill in all the details below except for the <\/span><strong><span data-preserver-spaces=\"true\">Password<\/span><\/strong><span data-preserver-spaces=\"true\">\u00a0field.<\/span><\/p>\n<h3><span data-preserver-spaces=\"true\">Log In with Username and Password<\/span><\/h3>\n<p><strong><span data-preserver-spaces=\"true\">File protocol<\/span><\/strong><span data-preserver-spaces=\"true\">: we&#8217;ll use SFTP since it&#8217;s available out of the box on the server. SFTP is good enough for most purposes, but if you often need to download\/upload hundreds or thousands of files at a time, you might want to configure a WebDAV server in the future and connect through that protocol. WebDAV works faster when dealing with lots of small files, and it also supports reading file blocks selectively. This allows you to read something in the middle of a 10GB file, without downloading the whole file to your computer.<\/span><\/p>\n<p><strong><span data-preserver-spaces=\"true\">Hostname:<\/span><\/strong><span data-preserver-spaces=\"true\"> This can be misleading since, instead of\u00a0<\/span><em><span data-preserver-spaces=\"true\">names<\/span><\/em><span data-preserver-spaces=\"true\">, you can also enter numbers. In most cases, you will fill in the external (Internet) IP address of your instance here (such as &#8220;203.0.113.0&#8221;). If you&#8217;ve already set up a domain name (such as example.com) to point to this instance, you can also use that.<\/span><\/p>\n<p><strong><span data-preserver-spaces=\"true\">Port number:<\/span><\/strong><span data-preserver-spaces=\"true\"> In this case, the port on which the SSH daemon on your instance is configured to listen. By default, this is 22. For other protocols, such as WebDAV, the default port will be different, for example, 80.<\/span><\/p>\n<p><em><span data-preserver-spaces=\"true\">Note: username is case-sensitive. &#8220;John Smith&#8221; will not work if the user is named &#8220;John Smith&#8221; on your instance and vice versa. The same is true for passwords.<\/span><\/em><\/p>\n<h3><strong><span data-preserver-spaces=\"true\">User name<\/span><\/strong><\/h3>\n<p><span data-preserver-spaces=\"true\">When connecting through the SFTP protocol, you fill in the username you&#8217;re currently using to log in through SSH. In most cases, this will be &#8220;root&#8221;, since it&#8217;s the first user available on a Linux machine and has permissions to read\/write files in all locations. It is, however, recommended that Password logins be turned off, at least for root, and only key-based Authentication for this user should be allowed through a directive such as PermitRootLogin without a password added to the SSH daemon configuration file.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\"> Allowing roaming on the server, combined with password authentication, dramatically increases the risk of someone (or something, such as a scanning bot) successfully brute-forcing your Password and compromising your instance. Private keys are resistant to brute-force attacks. If possible for your use case, create an unprivileged user, give it read\/write permissions only to specific areas of the filesystem, and use this account to log in with WinSCP. An unprivileged user cannot write, overwrite, or delete important files from your Linux server, helping you avoid occasional mistakes.<\/span><\/p>\n<p>After entering all of the information mentioned above and your Password, click Save, so you don&#8217;t have to re-enter the same data the next time you want to log in. Afterward, click the Login button. If this is the first time you are connecting to the server, a warning will appear:<\/p>\n<p><span data-preserver-spaces=\"true\">This is normal and nothing to worry about. Fingerprints, being unique, are a way to identify that the server we are connecting to is the intended one.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">This prevents connecting to the wrong server (for example, due to writing the wrong IP) and man-in-the-middle attacks, such as when someone redirects you to a server they control to steal your login information. Since this is your first time connecting,<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">you don&#8217;t have a fingerprint in the database. Click &#8220;Yes&#8221; to add it. Once you know the key for an instance is in the database, you should consider whether this warning reappears. The fingerprint should change only if you regenerate your SSH host keys. This can happen when you re-initialize the system disk, remove and reinstall the SSH daemon, or manually regenerate your host keys. If you double-click and still get the warning, something may be wrong.<\/span><\/p>\n<h3><strong><span data-preserver-spaces=\"true\">Log in with SSH Private Key<\/span><\/strong><\/h3>\n<p><span data-preserver-spaces=\"true\">After you fill in all of the fields mentioned above in the login\/session manager, except for <\/span><strong><span data-preserver-spaces=\"true\">the Password<\/span><\/strong><\/p>\n<p><span data-preserver-spaces=\"true\">Click on the button to drag and drop files, select<\/span><span data-preserver-spaces=\"true\"> open:<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">In the left-side menu, under\u00a0<\/span><strong><span data-preserver-spaces=\"true\">SSH<\/span><\/strong><span data-preserver-spaces=\"true\">, go to <\/span><strong><span data-preserver-spaces=\"true\">Authentication<\/span><\/strong><span data-preserver-spaces=\"true\">, click on the button with the right-click, and select<\/span><span data-preserver-spaces=\"true\"> the input field (the one with the three dots), like in the picture above. This expects a file with a similar key in the PuTTY Private Key format. If you only have one in the OpenSSH key format available, WinSCP will offer to convert it automatically. However, if the file you want to select doesn&#8217;t have the .ppk extension, you won&#8217;t find it listed in the file browser. Go to the bottom-right corner and change the filter to <\/span><strong><span data-preserver-spaces=\"true\">All Files (<\/span><em><span data-preserver-spaces=\"true\">.<\/span><\/em><span data-preserver-spaces=\"true\">)<\/span><\/strong><\/p>\n<p><span data-preserver-spaces=\"true\">Import your private key file. When you&#8217;re done, save your settings and click &#8220;Login&#8221;.<\/span><\/p>\n<h3><strong><span data-preserver-spaces=\"true\">Transfer Files with WinSCP<\/span><\/strong><\/h3>\n<p><span data-preserver-spaces=\"true\">After connecting, you&#8217;ll get two panels with files. The one on the right shows the files on the Linux instance, and it opens by default in the user&#8217;s home directory. This is \/root for the root user and \/home\/name_of_user for other users. In the left panel, you have local files listed. To navigate &#8220;one directory up&#8221; (to the parent directory), double-click the first entry in that list (the icon that shows an arrow pointing upward).<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Import your private key file. When you&#8217;re done, save your settings and click &#8220;Login&#8221;.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">It&#8217;s assumed that users familiar with Windows know about dragging and dropping files, selecting multiple files by holding down the CTRL key and then clicking on the desired selections, right-clicking and selecting the desired action, etc. These are all features integrated into WinSCP so that it functions in a similar way to Windows File Explorer.<\/span><\/p>\n<h2><span data-preserver-spaces=\"true\">Conclusion<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">Therefore, this article discusses WinSCP and how to connect to your Linux server using it. We also prepared a video about this.<\/span><\/p>\n<h2>FAQ<\/h2>\n<div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is WinSCP used for?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>WinSCP is a Windows application that securely transfers files to remote servers using SCP, SFTP, and FTP protocols.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do I connect to a Linux server with WinSCP?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Enter your server\u2019s hostname\/IP, username, password or key, choose SFTP\/SCP, and connect to upload or manage files.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Is WinSCP secure?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes, WinSCP uses encrypted protocols like SFTP and SCP to ensure secure file transfers over networks.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you use Windows on your local computer, as you work with remote\u00a0Linux servers, you occasionally need to transfer files between these two points. Fortunately, all popular Linux distributions come pre-configured on Alibaba Cloud Elastic Compute Service (ECS) instances with an SSH daemon, which includes support for secure file transfers through SFTP. SFTP is an [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":22220,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[69],"tags":[3194,3192,3193],"class_list":["post-22178","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux-distributions","tag-linux-server","tag-winscp"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/22178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/comments?post=22178"}],"version-history":[{"count":3,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/22178\/revisions"}],"predecessor-version":[{"id":266262,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/22178\/revisions\/266262"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media\/22220"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media?parent=22178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/categories?post=22178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/tags?post=22178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}