scp command doesn't work

When i try to use the scp command, it just displays the below. I am sure that the command I am using is right.


usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]


            [-J destination] [-l limit] [-o ssh_option] [-P port]


            [-S program] source ... target


Can you help me with this?


Thanks

MacBook Pro 15″, macOS 11.2

Posted on May 11, 2021 8:28 AM

Reply
8 replies

May 11, 2021 6:15 PM in response to manjunath224

It would help if you would show us the exact command you are trying to use (make sure to edit the DNS Name or IP address if public). Make sure to use the "Code Insertion" icon (looks like "<>") when posting any terminal commands and error messages so they can be easily read. There should be a "verbose" option for "scp" which should print a more detailed error message.


Have you ever used "scp" before?


The hardest part is getting the correct path for the remote system.

May 11, 2021 7:12 PM in response to BobTheFisherman

BobTheFisherman wrote:

Maybe sftp would be a better choice. I think scp is outdated and no longer supported. But I may be wrong.

It's the neither. ftp is the outdated and unsupported one. sftp is a modern version of ftp that uses an ssh connection. scp is a remote version of "cp" that uses an ssh connection. I would expect that scp is available anywhere ssh is possible. I'm not sure about sftp. It may not be present everywhere. Just guessing.

May 11, 2021 7:52 PM in response to BobTheFisherman

BobTheFisherman wrote:

FWIW. From Wikipedia:
"According to OpenSSH developers in April 2019, SCP is outdated, inflexible and not readily fixed; they recommend the use of more modern protocols like sftp and rsync for file transfer."

That's news to me. sftp does seem to be enabled and available on recent versions of Linux.


However, I find scp much more convenient. I just had to do some file transfers and sftp worked well enough to download from the server. But then I needed to send a file to another server. I'm not sure how to do that. I could use interactive mode I guess. But scp uses cp semantics so I don't have to think about it. cp to or cp fro. I'll stick with scp.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

scp command doesn't work

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.