From d87d3bb5479178c9b86f8d41a498a4e2ab8d1430 Mon Sep 17 00:00:00 2001 From: Adam Caprez <acaprez2@unl.edu> Date: Thu, 9 Mar 2023 19:13:02 -0600 Subject: [PATCH] Make workaround more visible. --- content/handling_data/data_transfer/scp.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/content/handling_data/data_transfer/scp.md b/content/handling_data/data_transfer/scp.md index 8da4794d..66742873 100644 --- a/content/handling_data/data_transfer/scp.md +++ b/content/handling_data/data_transfer/scp.md @@ -47,10 +47,12 @@ $ scp <user_name>@crane.unl.edu:/work/<group_name>/<user_name>/data.csv ./ ### Potential incompatibility with recent versions of scp -{{% notice note %}} -The scp command when used with shell variable or pathname expanded +{{% notice info %}} +Recent versions of scp command when used with shell variable or pathname expanded source/target arguments, along with certain recursive copy requests, may return unexpected errors compared with older versions of the command. + +**Use the `-O` option to restore the prior behavior and work around the issue.** {{% /notice %}} Beginning with OpenSSH release 8.8, the scp client defaults to using @@ -58,9 +60,10 @@ the SFTP protocol over the legacy SCP protocol. This change in protocol removes the user's shell from completing environment variable expansion or wildcard pathname matching on the path component being serviced by the remote server side of the transfer, as used in the SCP protocol. -This may cause scp transfers to return errors that worked with prior -versions of scp. +*This may cause scp transfers to return errors that worked with prior +versions of scp.* Some example error messages are listed below. +{{% panel theme="info" header="Example error messages" %}} {{< highlight bash >}} # Recursive copy incompatibility example. # <source_dir> is missing from the target path resulting in error: @@ -77,6 +80,7 @@ scp: failed to upload directory <source_dir> to /work/<group_name>/<user_name>/ $ scp <user_name>@crane.unl.edu:'$WORK/path/to/file' . scp: $WORK/path/to/file: No such file or directory {{< /highlight >}} +{{% /panel %}} To restore the prior shell expansion behavior on the remote server side of the transfer, add the [-O](https://man.openbsd.org/scp#O) flag in your -- GitLab