The annoying bug of scp silently fail without error message.

I was totally thinking I did something terrible wrong when trying to copy files through a jump server. It turned out, to be nothing related to jump server but apparently a known issue with SCP silently failure when something funny going on with .bashrc It took a few searches to lead to these results and hopefully it will help you too.

The solution is suggested here:

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

Also detailed here in StackOverflow: