Cannot scp files from remote server to computer

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?

1

1 Answer

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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like