I'm currently trying to copy some files from a Server (Ubuntu 20.04) to a domain computer (Windows 10) via scp.

But I've so far been unable to do it successfully. Summing up the situation:

I'm using Putty to connect via SSH to an Ubuntu Server (connecting via IP and a specific port) and with user and password authentication.

I'm running the SCP command like this:

scp -P (the port used for the SSH connection to the server) /folder/subfolder/file domain_account_name@domain_computer_IP:"Destination Location"

But my scp attempts always end up in a time out.

I've tried running the scp command with the specific port being used when connecting to the Server and also the default one (22). Both attempts end up with the same result.

Any ideas as to where I might be messing up?


  • In order to scp to a system, that system must be running sshd, and authentication must be set up.
    – waltinator
    May 5, 2022 at 19:07
  • 2
    Your mistake is likely in SSHing into the server first; to push files from there using scp would require an SSH server operating on the Windows machine - and a route for incoming connections to it. OTOH you should be able to simply pull files from the server directly from Windows using Windows 10’s New Built-in SSH Commands or PuTTY's pscp command or using WinSCP or Filezilla if you want a GUI solution. May 5, 2022 at 20:18
  • Try to run the command from the powershell if you're in a windows system. May 5, 2022 at 21:26
  • 1
    It seems to me that SO didn't want the question and that the question is about pulling files from an Ubuntu system to a Windows system. I think that Superuser might be the best home for this question, but the author hasn't yet followed their question to U&L so I hesitate to migrate it once more for fear they'd never find it.
    – Jeff Schaller
    May 5, 2022 at 21:57
  • I'm not currently able to leave a comment on the original SO post, in order to ask David to consider posting on SU. If the U&L community closes this question, I think it rejects the migration and ends up closed on SO, at which point someone can communicate with David.
    – Jeff Schaller
    May 5, 2022 at 21:59

2 Answers 2


Without going into complexities that may be unnecessary for someone just getting started, lets try to keep it simple.

If I'm reading your question correctly, you are following these steps:

  1. Putty from Windows PC to Linux Host on port 22 works as it should and you can login and get a shell prompt.
  2. Once logged in, you are trying to scp from the Linux host to the Windows PC and this fails with a timeout.

Given the default nature of most Windows PC's, this won't work.

Instead of logging into the Linux host and trying to push the file back toward the Windows PC, use an SCP tool on the Windows PC rather than Putty and simply grab the file you want.

An example of such a utility would be WinSCP (https://winscp.net/eng/download.php). It's easy to use and very intuitive for people more familiar with the point-and-click ways of Windows.

  • Thanks for the suggestion, I'm going to see if I can do it with WinSCP on a server I have created for testing, and then after suceeding in that one I'll try to see if I can do it on the actual one I need to do it on May 6, 2022 at 8:43
  • I've tested with my test server as well as the actual server I needed to access, and I've successfully pulled the files using WinSCP. Considering it's a domain computer and I'm not a computer admin I thought that could create some issues, but just by using the WinSCP portable app I worked around that and done what I needed to. I can't cast a vote as I don't have enough reputation, but your suggestion seems like the fastest/ easiest way to at least do what I intend to, and I'm pretty sure it would fit the needs of other users. May 6, 2022 at 9:40

This is mostly comment (but space in the comments box is limited).

It is FAR FROM CLEAR in your question what action is occurring where.

I'm using Putty to connect via SSH to an Ubuntu Server (connecting via IP and a specific port) and with user and password authentication.

So I infer that you are operating the MS-Windows computer and connecting to the Linux machine which I presume you described elsewhere as the host and server respectively.

SCP -P (the port used for the SSH connection to the server) /folder/subfolder/file domain_account_name@domain_computer_IP:"Destination Location"

I don't know what you are trying to tell me. I am not aware of any program named SCP on Linux. Thye usually have "scp". The scp client which ships with putty (and runs on MS-Windows where the CMD shell is not case sensitive) is named PSCP.EXE. Is this being run on the MS-Windows machine or the Linux machine?

Also you are using yet another term to describe one of the devices "domain_computer_IP".

  • IF the command is being run on your MS-Windows machine
  • AND you are using the same credentials as for your putty session

then there are no reasons for this to fail which are not VERY esoteric.

OTOH if you are trying to run the command on the Linux machine to send the file back to the MS-Windows machine AND you've mis-quoted it here then there are many MANY reasons it could have failed. But the short version is to run the scp command from the MS-Windows machine to retrieve the file....

pscp -P %PORT% %LINUXUSER%@%LINUXHOST%:/directory/subdirectory/file C:\TEMP\
  • When I find myself with more questions than answers when writing an Answer, it's often a sign that the question needs clarification. I'd recommend asking those clarifying questions under the Question so that the Question becomes more answerable.
    – Jeff Schaller
    May 5, 2022 at 21:54
  • Yes, the command I need to use is scp, i forget sometimes how picky command lines and terminals are with upper and lower casing So far every time I tried to run the commands was by running them in the putty terminal (my connection to the server), and by trying to send the files from the server to the windows host I tried to run the command with the computername, and that having failed I tried to use the IP address of it, meaning no need for the system to figure out the IP address of the specified computer. I will now doing an scp transfer by pulling the files via windows May 6, 2022 at 8:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .