fir3net
PPS-Firenetbanner-780.5x190-30-03-17

Why does my scp file transfer fail but no error message is shown ?

Issue

When using scp to copy a file the file fails to transfer, however there is no error message.

Solution

This issue can occur due echo commands within your .bashrc and how the scp program handles the output from these commands. This is a known bug within scp which can be viewed here.

To resolve this the following can be added to the top of your .bashrc file.

# If not running interactively, don't do anything
[[ $- == *i* ]] || return

Tags: Linux, SCP

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001