I'm renting a dedicated server, and I wish to copy some files from that server and onto my personal computer. The server is running Ubuntu LTE 20.04, and is SSH enabled. SSHing into the server works as intended.

The problem appears when I try to SCP a file to/from the server using my computer. When running a standard scp command, it prompts me for a password, and then hangs until i SIGINT locally. scp'ing stuff off the server when I am logged in through SSH works well, I can transfer files to/from the server that way. So:

scp server -> home computer works scp home computer -> server does not work

Has anyone been in this situation before? How can I resolve this problem?

  • You could run the ssh server on the remote computer with debug options e.g. -vvv. Perhaps -vvv on the client also helps. I would also look check for relevant messages in /var/log/syslog and/or /var/log/auth.log on the server. Another approach is to try key-based authentication instead of the password. May 19, 2021 at 14:19

1 Answer 1


The scp command use the port 22 to access the server, usually.

It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1).

So if you can access the server though a simple ssh access, it could be something else that is blocking you.

I think you could try with the verbose mode -v to try figuring out what's going on during the connection to the server.

-v' Verbose mode. Causes scp and ssh(1) to print debugging messages about their progress. This is helpful in debugging connection, authentication, and configuration problems. The scp utility exits 0 on success, and >0 if an error occurs.

After you had received more information about the connection, you could update this post so we can try to help you more about the issue.

Or if one direction is working, you could try to exploit it in your advantage.

While you are inside your server you could pull inside the file.

Doing something like this:

scp /localServerPath user@yourPersonalPcIP:/pathofthefile

Because scp can send file, but can also pull it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.