You must replace this with your own user and destination information. Pscp-test.txt is the name of the file you want to transfer from is my username on the Linux computer, and the IP address of the Linux computer. Pscp: The command used to transfer the file. Open Powershell and use the dir command to change to the Documents folder, where the sample file is located:Įnd of keyboard-interactive prompts from server Now that you have the pscp command and the destination address, you're ready to transfer the test file pscp-test.txt. In this example, I have a file called pscp-test.txt that I want to transfer from C:\Users\paul\Documents on my Windows computer to my destination Linux computer home directory /_home_/paul. To ensure your firewall allows SSH traffic, run this command: $ sudo firewall-cmd -add-service ssh -permanentįor more information on firewalls on Linux, read Make Linux stronger with firewalls. If you're not sure whether your Linux machine is running SSH, then run this command on the Linux machine: $ sudo systemctl enable -now sshd The pscp command uses the OpenSSH protocol, so your Linux computer must be running the OpenSSH server software, and its firewall must allow SSH traffic. If you're not sure which is which, you can try each one in succession until you get the right one (and then write it down somewhere!)Īlternately, you can look in the settings of your router, which lists all addresses assigned over DHCP. On your system, the IP address is likely to be different. In all cases, 127.0.0.1 is a loopback address that the computer uses only to talk to itself, so in this example the correct address is 192.168.1.23. Assuming it's a computer on your same network, and that you're not running a DNS server to resolve computer names, you can find the destination IP address using the ip command on the Linux machine: $ ip addr show | grep 'inet ' Type pscp –version to confirm that your computer can find the command.īefore you can make the transfer, you must know the IP address or fully-qualified domain name of the destination computer. Open Powershell on your Windows computer using the search bar in the Windows taskbar (type 'powershell` into the search bar.) If you haven't set a PATH variable for yourself, you can alternately move pscp.exe to the folder holding the files you're going to transfer. Move pscp.exe to a folder in your PATH (for example, Desktop\App if you followed the PATH tutorial here on ). PSCP (PuTTY Secure Copy Protocol) is a command-line tool for transferring files and folders from a Windows computer to a Linux computer. If you're unfamiliar with that process, read how to set a PATH on Windows. Knowing how to set your command path in Windows makes it easier to use a handy utility like PSCP. Are you looking for a way to quickly transfer files from your Windows computer to your Linux computer and back again? The open source PSCP utility makes it easy to transfer files and folders, and of course it's open source.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |