To an ASA
Need to do this a few times for some work. It looks like the ASA is a bit picky about how you specify the destination location when you try and do it from a UNIX box.
Enable SSH copy on the ASA
ssh scopy enable
Copy the ASA image from the local directory on your UNIX box to the device.
scp -v asa825-51-k8.bin username@IP_ADDRESS:disk0:asa825-51-k8.bin
If you don’t use this format the UNIX box will give you an error message along the lines of “lost connection”, though the transfer will seem to have completed.
From an ASA
Tested with an ASA running asa723-k8.bin
scp -v firstname.lastname@example.org:disk0:asa822-k8.bin asa822-k8.bin