SCP not working with MacOS?

SCP not working with MacOS?

SCP not working with MacOS? This is normal. Here is the reason and how to solve this problem.

SCP not working with MacOS?

The symptom

The SCP command that you have already done thousands of times to upload or download a file from/to a network device gives an error, for example:

~ scp nxos64-cs.10.2.4.M.bin admin@myswitch:bootflash:///
(admin@myswitch) Password:
subsystem request failed on channel 0
scp: Connection closed

 

Why SCP not working with MacOS?

The SCP protocol has been deprecated in OpenSSH 9.0, which Apple provides in Ventura.

This release switches scp(1) from using the legacy scp/rcp protocol to using the SFTP protocol by default

More details here: https://www.openssh.com/txt/release-9.0

 

The solution

The solution is given on this same page; you must use the -O flag:

In case of incompatibility, the scp(1) client may be instructed to use the legacy scp/rcp using the -O flag.

For example:

~ scp -O nxos64-cs.10.2.4.M.bin admin@myswitch:bootflash:///

 

Other posts on the subject

If you enjoyed this article, check out my other posts on Linux networking tips and tricks:

 


Did you like this article? Please share it…

1 Comment

  1. Serik Perez

    Thankss, you really saved my day!!

Leave a Reply

Your email address will not be published. Required fields are marked *