Two possible problems (1) Extra '$' at the beginning of the assignment, and (2) embedded spaces.
The first potential problem is the assignment in the style $var=foo. In zsh
like in other sh-like engines (ksh, bash, ...), the assignment operation is VAR=value - no $
.
The second potential problem are the spaces. No spaces are allowed between the variables name, the '=' and the value. Spaces in the value must be escaped (with quotes, or backslash)
Potential correction:
HOST=User@1.1.1.1
scp "$BASE_DIR/path/to/file" $HOST:some\path
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…