🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 19 (from laksa106)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
1 month ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH1.5 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder
Last Crawled2026-02-24 07:17:41 (1 month ago)
First Indexed2014-03-15 20:13:14 (12 years ago)
HTTP Status Code200
Meta TitleSCP copy windows local file to linux remote folder - Server Fault
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
This question shows research effort; it is useful and clear 31 Save this question. Show activity on this post. How to get a file from my path d:/test.txt and copy it to /etc/var/test/test.txt? I've tried this: scp d:/test.txt /etc/var/test/test.txt but that didn't work. How do I set the hard disk from where I copy my files? asked Mar 14, 2014 at 10:30 1 This answer is useful 25 Save this answer. Show activity on this post. Umm, if you're using cygwin you want that command to look like scp /cygdrive/d/test.txt <linux ip>:/etc/var/test/test.txt Or you can use WinSCP, you'll probably find that simpler. answered Mar 14, 2014 at 10:47 This answer is useful 18 Save this answer. Show activity on this post. The best way to copy files from Windows to Linux using the command line is through pscp. It is very easy and secure. For pscp to work on your windows machine, you need it add its executable to your systems path. Once it is done, you can use the following format to copy the file. pscp -pw password D:\test.txt user@192.168.33.10:/etc/var/test/test.txt You can refer the following blog post for more information on pscp setup. http://comtechies.com/2016/02/copy-files-between-windows-and-linux.html answered Feb 25, 2016 at 10:13 2 This answer is useful 8 Save this answer. Show activity on this post. to copy a file from windows to linux write: scp -i privatekey pathFileOnWindows user@publicIp:pathDirectoryLinux (the colon : is important!) Example: //I am located here in my console C:\Users\oscar> //I'm executing the next command scp -i C:\Users\oscar\Documents\llaves\ubuntu.pem C:\Users\oscar\Documents\index.html ubuntu@ec2-54-94-247-176.sa-east-1.compute.amazonaws.com:~/ You can puth the full path or location in the path where the file is located. ~/ means the home directory of the user ubuntu Jenny D 28.4k 21 gold badges 80 silver badges 117 bronze badges answered Mar 19, 2019 at 3:47 1 This answer is useful 7 Save this answer. Show activity on this post. Assuming you are on Windows, best way is to download and install cygwin. Get the path to the binary folder and add it to the system path. You can now run Linux commands on your command line. Open the command prompt and go to the directory where your file is that you want to copy. Run the following command; scp file.txt root@1.1.1.1:/opt/ scp - secure copy command file.txt - file you want to copy root - username used to log onto CentOS machine 1.1.1.1 - IP address of CentOS machine. Needless to say your Windows machine and the CentOS machine have to be able to communicate with one another :/opt - This is the directory with which you save the file to, I generally save everything to the /opt directory Don't forget the @ between the username and IP Address and the : between the IP Address and directory you are saving the file to If you need a key to login into the server, enter the following; scp key.pem file.txt root@1.1.1.1:/opt For handiness sake I just copy the file I want to copy across to the key file directory, that way you know everything will run smoothly answered Mar 20, 2014 at 17:15 This answer is useful 6 Save this answer. Show activity on this post. I would highly recommend to use WinSCP if you're a Windows user . It has a good intuitive interface and gets the job done easily and with no pain. Download link answered Oct 1, 2015 at 19:52 This answer is useful 1 Save this answer. Show activity on this post. If you are on the remote machine: scp user@hostname:D:\text.txt user@hostname:/etc/var/test/test.txt If you are currently on Windows machine: winscp D:\text.txt user@hostname:/etc/var/test/test.txt answered Mar 14, 2014 at 10:56 This answer is useful 1 Save this answer. Show activity on this post. pscp with -pw exposes my password, which I don't like. The below answer works just like me using scp on linux -> linux. pscp -scp C:\Windows\foo.txt username@10.0.0.1:/foo/bar answered Aug 23, 2019 at 22:06 This answer is useful 1 Save this answer. Show activity on this post. First you have to install any ssh client (OpenSSH) which support command line interface for your windows machine: And add its path to windows Variable: My Windows System output like below: Then you will able to execute the same commands on your windows machine You can copy also complete directory by executing: scp -r path/to/dir_name/* user@remote-ip:/path/to/destination_dir To Copy Single File: scp -r path/to/file_name.zip user@remote-ip:/path/to/destination_dir/ Replace the file extension with your own file. answered Mar 1, 2016 at 14:44 This answer is useful 0 Save this answer. Show activity on this post. WinSCP is definitely an useful utility, especially if you want a graphic interface. But if you're looking for a command line alternative without having to deal with installing cygwin, there's also pscp which is part of the PuTTY collection of tools. http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html answered Oct 1, 2015 at 21:25 This answer is useful 0 Save this answer. Show activity on this post. if you are using windows and want to copy to the linux server then install the WINSCP and just use the drag and drop answered Oct 15, 2015 at 9:51 This answer is useful 0 Save this answer. Show activity on this post. OpenSSH is available for PowerShell since 2019. Instructions for installation are available from Microsoft's Docs site . Instructions for use of OpenSSH utilities are available on OpenSSH project site . Basically, once you install the OpenSSH suite, scp will work as you are accustomed. scp user@source:path/to/source/file user@destination:path/to/target/file where source and destination are hostnames or IP addresses and a path and filename without a host name/address will be treated as local. answered Apr 5, 2021 at 14:20 This answer is useful 0 Save this answer. Show activity on this post. SCP <path of the file along with filename and extension> <name of vm>@<ip address>:<path where file needs to be copied> answered Dec 19, 2022 at 7:49 You must log in to answer this question. Start asking to get answers Find the answer to your question by asking. Ask question Explore related questions See similar questions with these tags.
Markdown
# ![site logo](https://stackoverflow.com/Content/Img/SE-logo75.png) By clicking “Sign up”, you agree to our [terms of service](https://serverfault.com/legal/terms-of-service/public) and acknowledge you have read our [privacy policy](https://serverfault.com/legal/privacy-policy). # OR Already have an account? [Log in](https://serverfault.com/users/login) [Skip to main content](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder#content) #### Stack Exchange Network Stack Exchange network consists of 183 Q\&A communities including [Stack Overflow](https://stackoverflow.com/), the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. [Visit Stack Exchange](https://stackexchange.com/) 1. - [Tour Start here for a quick overview of the site](https://serverfault.com/tour) - [Help Center Detailed answers to any questions you might have](https://serverfault.com/help) - [Meta Discuss the workings and policies of this site](https://meta.serverfault.com/) - [About Us Learn more about Stack Overflow the company, and our products](https://stackoverflow.co/) 2. ### [current community](https://serverfault.com/) - [Server Fault](https://serverfault.com/) [help](https://serverfault.com/help) [chat](https://chat.stackexchange.com/?tab=all&sort=active) - [Meta Server Fault](https://meta.serverfault.com/) ### your communities [Sign up](https://serverfault.com/users/signup?ssrc=site_switcher&returnurl=https%3A%2F%2Fserverfault.com%2Fquestions%2F582048%2Fscp-copy-windows-local-file-to-linux-remote-folder) or [log in](https://serverfault.com/users/login?ssrc=site_switcher&returnurl=https%3A%2F%2Fserverfault.com%2Fquestions%2F582048%2Fscp-copy-windows-local-file-to-linux-remote-folder) to customize your list. ### [more stack exchange communities](https://stackexchange.com/sites) [company blog](https://stackoverflow.blog/) 3. [Log in](https://serverfault.com/users/login?ssrc=head&returnurl=https%3A%2F%2Fserverfault.com%2Fquestions%2F582048%2Fscp-copy-windows-local-file-to-linux-remote-folder) 4. [Sign up](https://serverfault.com/users/signup?ssrc=head&returnurl=https%3A%2F%2Fserverfault.com%2Fquestions%2F582048%2Fscp-copy-windows-local-file-to-linux-remote-folder) [![Server Fault](https://serverfault.com/Content/Sites/serverfault/Img/logo.svg?v=43f5b6d5f65b)](https://serverfault.com/) 1. 1. [Home](https://serverfault.com/) 2. [Questions](https://serverfault.com/questions) 3. [Unanswered](https://serverfault.com/unanswered) 4. [AI Assist](https://stackoverflow.com/ai-assist) 5. [Tags](https://serverfault.com/tags) 6. [Chat](https://chat.stackexchange.com/rooms/158962/stack-exchange-lobby) 7. [Users](https://serverfault.com/users) 8. [Companies](https://stackoverflow.com/jobs/companies?so_medium=serverfault&so_source=SiteNav) 2. Stack Internal Stack Overflow for Teams is now called **Stack Internal**. Bring the best of human thought and AI automation together at your work. [Try for free](https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=serverfault-community&utm_campaign=side-bar&utm_content=explore-teams) [Learn more](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=serverfault-community&utm_campaign=side-bar&utm_content=explore-teams) 3. [Stack Internal]() 4. Bring the best of human thought and AI automation together at your work. [Learn more](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=serverfault-community&utm_campaign=side-bar&utm_content=explore-teams-compact) **Stack Internal** Knowledge at work Bring the best of human thought and AI automation together at your work. [Explore Stack Internal](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=serverfault-community&utm_campaign=side-bar&utm_content=explore-teams-compact-popover) # [SCP copy windows local file to linux remote folder](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder) [Ask Question](https://serverfault.com/questions/ask) Asked 11 years, 10 months ago Modified [3 years, 1 month ago](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder?lastactivity "2022-12-19 07:49:02Z") Viewed 602k times This question shows research effort; it is useful and clear 31 Save this question. Show activity on this post. How to get a file from my path d:/test.txt and copy it to /etc/var/test/test.txt? I've tried this: ``` scp d:/test.txt /etc/var/test/test.txt ``` but that didn't work. How do I set the hard disk from where I copy my files? - [linux](https://serverfault.com/questions/tagged/linux "show questions tagged 'linux'") - [windows](https://serverfault.com/questions/tagged/windows "show questions tagged 'windows'") - [centos](https://serverfault.com/questions/tagged/centos "show questions tagged 'centos'") - [scp](https://serverfault.com/questions/tagged/scp "show questions tagged 'scp'") [Share](https://serverfault.com/q/582048 "Short permalink to this question") Share a link to this question Copy link [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") [Improve this question](https://serverfault.com/posts/582048/edit) Follow Follow this question to receive notifications [edited Jun 11, 2022 at 22:36](https://serverfault.com/posts/582048/revisions "show all edits to this post") [![clabacchio's user avatar](https://i.sstatic.net/MCAPX.jpg?s=64)](https://serverfault.com/users/969568/clabacchio) [clabacchio](https://serverfault.com/users/969568/clabacchio) 10344 bronze badges asked Mar 14, 2014 at 10:30 [![user3414354's user avatar](https://graph.facebook.com/100005131623987/picture?type=large)](https://serverfault.com/users/212704/user3414354) [user3414354](https://serverfault.com/users/212704/user3414354) 41111 gold badge44 silver badges33 bronze badges 1 - Looks like the slash after d: is the wrong way round? Paul – [Paul](https://serverfault.com/users/294249/paul "101 reputation") 2016-03-01 14:47:20 +00:00 [Commented Mar 1, 2016 at 14:47](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder#comment956862_582048) [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.") \| ## 12 Answers 12 Sorted by: [Reset to default](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder?answertab=scoredesc#tab-top) This answer is useful 25 Save this answer. Show activity on this post. Umm, if you're using cygwin you want that command to look like ``` scp /cygdrive/d/test.txt <linux ip>:/etc/var/test/test.txt ``` Or you can use WinSCP, you'll probably find that simpler. [Share](https://serverfault.com/a/582053 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://serverfault.com/posts/582053/edit) Follow Follow this answer to receive notifications answered Mar 14, 2014 at 10:47 [![quadruplebucky's user avatar](https://www.gravatar.com/avatar/b7530f691015a73111d9acf83baabd2a?s=64&d=identicon&r=PG&f=y&so-version=2)](https://serverfault.com/users/36099/quadruplebucky) [quadruplebucky](https://serverfault.com/users/36099/quadruplebucky) 5,3342424 silver badges2424 bronze badges [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 18 Save this answer. Show activity on this post. The best way to copy files from Windows to Linux using the command line is through pscp. It is very easy and secure. For pscp to work on your windows machine, you need it add its executable to your systems path. Once it is done, you can use the following format to copy the file. ``` pscp -pw password D:\test.txt user@192.168.33.10:/etc/var/test/test.txt ``` You can refer the following blog post for more information on pscp setup. <http://comtechies.com/2016/02/copy-files-between-windows-and-linux.html> [Share](https://serverfault.com/a/759691 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://serverfault.com/posts/759691/edit) Follow Follow this answer to receive notifications [edited Feb 26, 2016 at 5:48](https://serverfault.com/posts/759691/revisions "show all edits to this post") answered Feb 25, 2016 at 10:13 [![Bibin Wilson's user avatar](https://i.sstatic.net/jK5CJ.jpg?s=64)](https://serverfault.com/users/340465/bibin-wilson) [Bibin Wilson](https://serverfault.com/users/340465/bibin-wilson) 30122 silver badges55 bronze badges 2 - To improve your answer, I suggest you include some relevant quotes / summary in your answer ... (leaving the hyperlink in it is fie, eg for those who want more background info, etc) Pierre.Vriens – [Pierre.Vriens](https://serverfault.com/users/282070/pierre-vriens "1,153 reputation") 2016-02-25 11:16:43 +00:00 [Commented Feb 25, 2016 at 11:16](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder#comment955119_759691) - 1 is it possible to tar a directory on linux and send it to windows using pscp? amandanovaes – [amandanovaes](https://serverfault.com/users/217347/amandanovaes "153 reputation") 2019-06-04 02:17:50 +00:00 [Commented Jun 4, 2019 at 2:17](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder#comment1262204_759691) [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 8 Save this answer. Show activity on this post. to copy a file from **windows** to **linux** write: ``` scp -i privatekey pathFileOnWindows user@publicIp:pathDirectoryLinux ``` (the colon **:** is important!) Example: //I am located here in my console ``` C:\Users\oscar> ``` //I'm executing the next command ``` scp -i C:\Users\oscar\Documents\llaves\ubuntu.pem C:\Users\oscar\Documents\index.html ubuntu@ec2-54-94-247-176.sa-east-1.compute.amazonaws.com:~/ ``` You can puth the full path or location in the path where the file is located. `~/` means the home directory of the user `ubuntu` [Share](https://serverfault.com/a/958892 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") [Improve this answer](https://serverfault.com/posts/958892/edit) Follow Follow this answer to receive notifications [edited Mar 19, 2019 at 7:24](https://serverfault.com/posts/958892/revisions "show all edits to this post") [![Jenny D's user avatar](https://i.sstatic.net/HIUPb.jpg?s=64)](https://serverfault.com/users/120438/jenny-d) [Jenny D](https://serverfault.com/users/120438/jenny-d) 28\.4k2121 gold badges8080 silver badges117117 bronze badges answered Mar 19, 2019 at 3:47 [![Oscar Javier Gómez Sánchez's user avatar](https://lh4.googleusercontent.com/-6B_Hc4JHiMQ/AAAAAAAAAAI/AAAAAAAAC18/D3V3KwL_ltE/s64-rj/photo.jpg)](https://serverfault.com/users/514975/oscar-javier-g%C3%B3mez-s%C3%A1nchez) [Oscar Javier Gómez Sánchez](https://serverfault.com/users/514975/oscar-javier-g%C3%B3mez-s%C3%A1nchez) 8111 silver badge11 bronze badge 1 - 1 In 2020 PowerShell now has scp available without having to install anything else Daniel – [Daniel](https://serverfault.com/users/201746/daniel "131 reputation") 2020-02-27 21:55:20 +00:00 [Commented Feb 27, 2020 at 21:55](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder#comment1306139_958892) [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 7 Save this answer. Show activity on this post. Assuming you are on Windows, best way is to download and install cygwin. Get the path to the binary folder and add it to the system path. You can now run Linux commands on your command line. Open the command prompt and go to the directory where your file is that you want to copy. Run the following command; ``` scp file.txt root@1.1.1.1:/opt/ ``` - scp - secure copy command - file.txt - file you want to copy - root - username used to log onto CentOS machine - 1\.1.1.1 - IP address of CentOS machine. Needless to say your Windows machine and the CentOS machine have to be able to communicate with one another - :/opt - This is the directory with which you save the file to, I generally save everything to the /opt directory - Don't forget the @ between the username and IP Address and the : between the IP Address and directory you are saving the file to If you need a key to login into the server, enter the following; ``` scp key.pem file.txt root@1.1.1.1:/opt ``` For handiness sake I just copy the file I want to copy across to the key file directory, that way you know everything will run smoothly [Share](https://serverfault.com/a/583482 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://serverfault.com/posts/583482/edit) Follow Follow this answer to receive notifications answered Mar 20, 2014 at 17:15 [![Dan's user avatar](https://www.gravatar.com/avatar/9e6f0db1c35e686e46ab8c0767ac86e7?s=64&d=identicon&r=PG&f=y&so-version=2)](https://serverfault.com/users/213453/dan) [Dan](https://serverfault.com/users/213453/dan) 19511 gold badge11 silver badge77 bronze badges [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 6 Save this answer. Show activity on this post. I would highly recommend to use WinSCP if you're a **Windows user**. It has a good intuitive interface and gets the job done easily and with no pain. [Download link](http://winscp.net/eng/download.php) [![enter image description here](https://i.sstatic.net/tcaWg.png)](https://i.sstatic.net/tcaWg.png) [Share](https://serverfault.com/a/726131 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://serverfault.com/posts/726131/edit) Follow Follow this answer to receive notifications [edited Mar 1, 2016 at 14:23](https://serverfault.com/posts/726131/revisions "show all edits to this post") answered Oct 1, 2015 at 19:52 [![Andrei's user avatar](https://i.sstatic.net/rHVf5.jpg?s=64)](https://serverfault.com/users/314410/andrei) [Andrei](https://serverfault.com/users/314410/andrei) 16111 silver badge33 bronze badges [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 1 Save this answer. Show activity on this post. If you are on the remote machine: ``` scp user@hostname:D:\text.txt user@hostname:/etc/var/test/test.txt ``` If you are currently on Windows machine: ``` winscp D:\text.txt user@hostname:/etc/var/test/test.txt ``` [Share](https://serverfault.com/a/582057 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://serverfault.com/posts/582057/edit) Follow Follow this answer to receive notifications [edited Jan 31, 2018 at 16:05](https://serverfault.com/posts/582057/revisions "show all edits to this post") [![henrycarteruk's user avatar](https://www.gravatar.com/avatar/b30f13eba910edd70ffd2c62920a3169?s=64&d=identicon&r=PG)](https://serverfault.com/users/374913/henrycarteruk) [henrycarteruk](https://serverfault.com/users/374913/henrycarteruk) 12166 bronze badges answered Mar 14, 2014 at 10:56 [![pulsarjune's user avatar](https://i.sstatic.net/rvb2U.jpg?s=64)](https://serverfault.com/users/208767/pulsarjune) [pulsarjune](https://serverfault.com/users/208767/pulsarjune) 12344 bronze badges [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 1 Save this answer. Show activity on this post. pscp with -pw exposes my password, which I don't like. The below answer works just like me using scp on linux -\> linux. ``` pscp -scp C:\Windows\foo.txt username@10.0.0.1:/foo/bar ``` [Share](https://serverfault.com/a/980519 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") [Improve this answer](https://serverfault.com/posts/980519/edit) Follow Follow this answer to receive notifications answered Aug 23, 2019 at 22:06 [![lobi's user avatar](https://i.sstatic.net/YrDMH.jpg?s=64)](https://serverfault.com/users/272326/lobi) [lobi](https://serverfault.com/users/272326/lobi) 1,14344 gold badges1717 silver badges3030 bronze badges [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 1 Save this answer. Show activity on this post. First you have to install any ssh client (OpenSSH) which support command line interface for your windows machine: And add its path to windows Variable: My Windows System output like below: [![enter image description here](https://i.sstatic.net/bTpTy.png)](https://i.sstatic.net/bTpTy.png) Then you will able to execute the same commands on your windows machine You can copy also complete directory by executing: ``` scp -r path/to/dir_name/* user@remote-ip:/path/to/destination_dir ``` To Copy Single File: ``` scp -r path/to/file_name.zip user@remote-ip:/path/to/destination_dir/ ``` Replace the file extension with your own file. [Share](https://serverfault.com/a/760748 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") [Improve this answer](https://serverfault.com/posts/760748/edit) Follow Follow this answer to receive notifications [edited Apr 6, 2021 at 15:57](https://serverfault.com/posts/760748/revisions "show all edits to this post") [![Jeter-work's user avatar](https://www.gravatar.com/avatar/ea25a5b0e8d6bf724ac138d4499c375d?s=64&d=identicon&r=PG&f=y&so-version=2)](https://serverfault.com/users/369717/jeter-work) [Jeter-work](https://serverfault.com/users/369717/jeter-work) 87044 silver badges1616 bronze badges answered Mar 1, 2016 at 14:44 [![Ramesh Chand's user avatar](https://i.sstatic.net/e4nVk.jpg?s=64)](https://serverfault.com/users/314874/ramesh-chand) [Ramesh Chand](https://serverfault.com/users/314874/ramesh-chand) 25133 silver badges1010 bronze badges [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 0 Save this answer. Show activity on this post. WinSCP is definitely an useful utility, especially if you want a graphic interface. But if you're looking for a command line alternative without having to deal with installing cygwin, there's also `pscp` which is part of the PuTTY collection of tools. <http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html> [Share](https://serverfault.com/a/726152 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://serverfault.com/posts/726152/edit) Follow Follow this answer to receive notifications answered Oct 1, 2015 at 21:25 [![p\_q's user avatar](https://www.gravatar.com/avatar/20d84698c4ee41b8165e4a128bcaa4da?s=64&d=identicon&r=PG)](https://serverfault.com/users/158698/p-q) [p\_q](https://serverfault.com/users/158698/p-q) 1633 bronze badges [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 0 Save this answer. Show activity on this post. if you are using windows and want to copy to the linux server then install the WINSCP and just use the drag and drop [Share](https://serverfault.com/a/729135 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://serverfault.com/posts/729135/edit) Follow Follow this answer to receive notifications answered Oct 15, 2015 at 9:51 [![aryan's user avatar](https://www.gravatar.com/avatar/05a7272750455e4682ec41c9edaa4e8a?s=64&d=identicon&r=PG)](https://serverfault.com/users/316807/aryan) [aryan](https://serverfault.com/users/316807/aryan) 1 [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 0 Save this answer. Show activity on this post. OpenSSH is available for PowerShell since 2019. Instructions for installation are available from Microsoft's [Docs site](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse). Instructions for use of OpenSSH utilities are available on OpenSSH [project site](https://www.openssh.com/). Basically, once you install the OpenSSH suite, scp will work as you are accustomed. ``` scp user@source:path/to/source/file user@destination:path/to/target/file ``` where source and destination are hostnames or IP addresses and a path and filename without a host name/address will be treated as local. [Share](https://serverfault.com/a/1059408 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") [Improve this answer](https://serverfault.com/posts/1059408/edit) Follow Follow this answer to receive notifications answered Apr 5, 2021 at 14:20 [![Jeter-work's user avatar](https://www.gravatar.com/avatar/ea25a5b0e8d6bf724ac138d4499c375d?s=64&d=identicon&r=PG&f=y&so-version=2)](https://serverfault.com/users/369717/jeter-work) [Jeter-work](https://serverfault.com/users/369717/jeter-work) 87044 silver badges1616 bronze badges [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 0 Save this answer. Show activity on this post. ``` SCP <path of the file along with filename and extension> <name of vm>@<ip address>:<path where file needs to be copied> ``` [Share](https://serverfault.com/a/1118373 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") [Improve this answer](https://serverfault.com/posts/1118373/edit) Follow Follow this answer to receive notifications answered Dec 19, 2022 at 7:49 [![Aditya Fargade's user avatar](https://lh3.googleusercontent.com/a-/AFdZucpi4kEhH_uash8jm87O3LxbEoDLO5A8Y5c8QWyD2A=k-s64)](https://serverfault.com/users/997391/aditya-fargade) [Aditya Fargade](https://serverfault.com/users/997391/aditya-fargade) 1 [Add a comment](https://serverfault.com/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| ## You must [log in](https://serverfault.com/users/login?ssrc=question_page&returnurl=https%3A%2F%2Fserverfault.com%2Fquestions%2F582048) to answer this question. Start asking to get answers Find the answer to your question by asking. [Ask question](https://serverfault.com/questions/ask) Explore related questions - [linux](https://serverfault.com/questions/tagged/linux "show questions tagged 'linux'") - [windows](https://serverfault.com/questions/tagged/windows "show questions tagged 'windows'") - [centos](https://serverfault.com/questions/tagged/centos "show questions tagged 'centos'") - [scp](https://serverfault.com/questions/tagged/scp "show questions tagged 'scp'") See similar questions with these tags. - The Overflow Blog - [Automate your security whack-a-mole: Q\&A with Exaforce](https://stackoverflow.blog/2026/01/22/automate-your-security-whack-a-mole-q-and-a-with-exaforce/?cb=1) - [AI can 10x developers...in creating tech debt](https://stackoverflow.blog/2026/01/23/ai-can-10x-developers-in-creating-tech-debt/?cb=1) - Featured on Meta - [AI Assist: recent updates (January 2026)](https://meta.stackexchange.com/questions/416954/ai-assist-recent-updates-january-2026?cb=1) - [Community Engagement Across the Network: Focus for 2026](https://meta.stackexchange.com/questions/416985/community-engagement-across-the-network-focus-for-2026?cb=1) - [Server Fault now uses machine learning to flag spam automatically](https://meta.serverfault.com/questions/11005/server-fault-now-uses-machine-learning-to-flag-spam-automatically?cb=1) #### Related [88](https://serverfault.com/questions/21580/how-to-make-scp-copy-hidden-files?rq=1 "Question score (upvotes - downvotes)") [How to make scp copy hidden files?](https://serverfault.com/questions/21580/how-to-make-scp-copy-hidden-files?rq=1) [16](https://serverfault.com/questions/120505/problems-with-scp-stalling-during-file-copy-over-vpn?rq=1 "Question score (upvotes - downvotes)") [Problems with SCP stalling during file copy over VPN](https://serverfault.com/questions/120505/problems-with-scp-stalling-during-file-copy-over-vpn?rq=1) [809](https://serverfault.com/questions/264595/can-scp-copy-directories-recursively?rq=1 "Question score (upvotes - downvotes)") [Can scp copy directories recursively?](https://serverfault.com/questions/264595/can-scp-copy-directories-recursively?rq=1) [5](https://serverfault.com/questions/275269/ubuntu-scp-copy-stalls?rq=1 "Question score (upvotes - downvotes)") [Ubuntu SCP copy stalls](https://serverfault.com/questions/275269/ubuntu-scp-copy-stalls?rq=1) [49](https://serverfault.com/questions/295565/pscp-upload-an-entire-folder-windows-to-linux?rq=1 "Question score (upvotes - downvotes)") [PSCP: Upload an entire folder, Windows to Linux](https://serverfault.com/questions/295565/pscp-upload-an-entire-folder-windows-to-linux?rq=1) [378](https://serverfault.com/questions/357108/what-permissions-should-my-website-files-folders-have-on-a-linux-webserver?rq=1 "Question score (upvotes - downvotes)") [What permissions should my website files/folders have on a Linux webserver?](https://serverfault.com/questions/357108/what-permissions-should-my-website-files-folders-have-on-a-linux-webserver?rq=1) [65](https://serverfault.com/questions/363922/how-to-move-files-with-scp?rq=1 "Question score (upvotes - downvotes)") [How to move files with SCP?](https://serverfault.com/questions/363922/how-to-move-files-with-scp?rq=1) [2](https://serverfault.com/questions/527127/scp-stuck-when-trying-to-copy-files-from-linux-to-windows?rq=1 "Question score (upvotes - downvotes)") [scp stuck when trying to copy files from Linux to windows](https://serverfault.com/questions/527127/scp-stuck-when-trying-to-copy-files-from-linux-to-windows?rq=1) [1](https://serverfault.com/questions/777108/scp-to-copy-file-to-remote-server-fails-because-of-permissions?rq=1 "Question score (upvotes - downvotes)") [scp to copy file to remote server fails because of permissions](https://serverfault.com/questions/777108/scp-to-copy-file-to-remote-server-fails-because-of-permissions?rq=1) #### [Hot Network Questions](https://stackexchange.com/questions?tab=hot) - [What is the meaning of the Airbus model numbering system?](https://aviation.stackexchange.com/questions/114884/what-is-the-meaning-of-the-airbus-model-numbering-system) - [What is causing chain to drop to lower cogs while backpedaling?](https://bicycles.stackexchange.com/questions/99968/what-is-causing-chain-to-drop-to-lower-cogs-while-backpedaling) - [Mermin's Lights Out](https://puzzling.stackexchange.com/questions/136831/mermins-lights-out) - [What was the max. capacity of the tape drives of Epson's portable PCs (HX series)?](https://retrocomputing.stackexchange.com/questions/32423/what-was-the-max-capacity-of-the-tape-drives-of-epsons-portable-pcs-hx-series) - [Are you ready to Mingle?](https://puzzling.stackexchange.com/questions/136845/are-you-ready-to-mingle) - [Does TTL output specify the maximum current it can source?](https://electronics.stackexchange.com/questions/764836/does-ttl-output-specify-the-maximum-current-it-can-source) - [How should I split my code to make it readable, maintainable and testable?](https://softwareengineering.stackexchange.com/questions/460750/how-should-i-split-my-code-to-make-it-readable-maintainable-and-testable) - [с бугра meaning here?](https://russian.stackexchange.com/questions/29553/%D1%81-%D0%B1%D1%83%D0%B3%D1%80%D0%B0-meaning-here) - [About an integration trick](https://mathoverflow.net/questions/507375/about-an-integration-trick) - [How close could a star get to our solar system without disrupting the planets' orbits?](https://astronomy.stackexchange.com/questions/62138/how-close-could-a-star-get-to-our-solar-system-without-disrupting-the-planets-o) - [Why does my Python script only run correctly from command line but not via Triggerhappy?](https://superuser.com/questions/1934135/why-does-my-python-script-only-run-correctly-from-command-line-but-not-via-trigg) - [Is their any way to justify having this nation be this poor, while also having a valuable industry under government control?](https://worldbuilding.stackexchange.com/questions/272445/is-their-any-way-to-justify-having-this-nation-be-this-poor-while-also-having-a) - [New version of library not found by linker despite correct location](https://unix.stackexchange.com/questions/803984/new-version-of-library-not-found-by-linker-despite-correct-location) - [Templating - Trigger a death ability of a creature when that creature enters](https://boardgames.stackexchange.com/questions/64367/templating-trigger-a-death-ability-of-a-creature-when-that-creature-enters) - [Vertical centering in table cells](https://tex.stackexchange.com/questions/758726/vertical-centering-in-table-cells) - [Can Sullivan's "minimal A theory" be applied to time in 'Being and Time'?](https://philosophy.stackexchange.com/questions/135588/can-sullivans-minimal-a-theory-be-applied-to-time-in-being-and-time) - [Trolley problem variant](https://philosophy.stackexchange.com/questions/135595/trolley-problem-variant) - [LT8330 FBX current injection only shifts VOUT a few volts — why can’t I get 15 V → 32 V range?](https://electronics.stackexchange.com/questions/764893/lt8330-fbx-current-injection-only-shifts-vout-a-few-volts-why-can-t-i-get-15-v) - [Different column alignment of first-row](https://tex.stackexchange.com/questions/758759/different-column-alignment-of-first-row) - [I Tried to bake copy the diffuse color of the cat (right one) to the left cat (this cat has a eyes)](https://blender.stackexchange.com/questions/344721/i-tried-to-bake-copy-the-diffuse-color-of-the-cat-right-one-to-the-left-cat-t) - [Reversed Appositional Construction of の](https://japanese.stackexchange.com/questions/111688/reversed-appositional-construction-of-%E3%81%AE) - [Are the twin prime averages precisely the fixed points of some simple-looking function (because the primes are)?](https://math.stackexchange.com/questions/5121338/are-the-twin-prime-averages-precisely-the-fixed-points-of-some-simple-looking-fu) - [Is there a musical term for the "black keys"?](https://music.stackexchange.com/questions/143095/is-there-a-musical-term-for-the-black-keys) - [Why are spaces "simply connected" and not "simply-connected"?](https://english.stackexchange.com/questions/638753/why-are-spaces-simply-connected-and-not-simply-connected) [Question feed](https://serverfault.com/feeds/question/582048 "Feed of this question and its answers") # Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. ![](https://serverfault.com/posts/582048/ivc/ec16?prg=b88f8db7-f34d-4c91-b1a6-7c54042588af) # Why are you flagging this comment? It contains harassment, bigotry or abuse. This comment attacks a person or group. Learn more in our [Abusive behavior policy](https://serverfault.com/conduct/abusive-behavior). It's unfriendly or unkind. This comment is rude or condescending. Learn more in our [Code of Conduct](https://serverfault.com/conduct/abusive-behavior). Not needed. This comment is not relevant to the post. ``` ``` Enter at least 6 characters Something else. A problem not listed above. Try to be as specific as possible. ``` ``` Enter at least 6 characters Flag comment Cancel You have 0 flags left today # ![Illustration of upvote icon after it is clicked](https://serverfault.com/Content/Img/modal/img-upvote.png?v=fce73bd9724d) # Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. **Upvoting** indicates when questions and answers are useful. [What's reputation and how do I get it?](https://stackoverflow.com/help/whats-reputation) Instead, you can save this post to reference later. Save this post for later Not now ##### [Server Fault](https://serverfault.com/) - [Tour](https://serverfault.com/tour) - [Help](https://serverfault.com/help) - [Chat](https://chat.stackexchange.com/?tab=all&sort=active) - [Contact](https://serverfault.com/contact) - [Feedback](https://meta.serverfault.com/) ##### [Company](https://stackoverflow.co/) - [Stack Overflow](https://stackoverflow.com/) - [Stack Internal](https://stackoverflow.co/internal/) - [Stack Data Licensing](https://stackoverflow.co/data-licensing/) - [Stack Ads](https://stackoverflow.co/advertising/) - [About](https://stackoverflow.co/) - [Press](https://stackoverflow.co/company/press/) - [Legal](https://stackoverflow.com/legal) - [Privacy Policy](https://stackoverflow.com/legal/privacy-policy) - [Terms of Service](https://stackoverflow.com/legal/terms-of-service/public) - Cookie Settings - [Cookie Policy](https://policies.stackoverflow.co/stack-overflow/cookie-policy) ##### [Stack Exchange Network](https://stackexchange.com/) - [Technology](https://stackexchange.com/sites#technology) - [Culture & recreation](https://stackexchange.com/sites#culturerecreation) - [Life & arts](https://stackexchange.com/sites#lifearts) - [Science](https://stackexchange.com/sites#science) - [Professional](https://stackexchange.com/sites#professional) - [Business](https://stackexchange.com/sites#business) - [API](https://api.stackexchange.com/) - [Data](https://data.stackexchange.com/) - [Blog](http://blog.serverfault.com/?blb=1) - [Facebook](https://www.facebook.com/officialstackoverflow/) - [Twitter](https://twitter.com/stackoverflow) - [LinkedIn](https://linkedin.com/company/stack-overflow) - [Instagram](https://www.instagram.com/thestackoverflow) Site design / logo © 2026 Stack Exchange Inc; user contributions licensed under [CC BY-SA](https://stackoverflow.com/help/licensing) . rev 2026.1.22.38918
Readable Markdownnull
Shard19 (laksa)
Root Hash4232792808108743419
Unparsed URLcom,serverfault!/questions/582048/scp-copy-windows-local-file-to-linux-remote-folder s443