How can I scp a file with a colon in the file name?

Not quite a bash escaping problem, it’s scp treating x: as a [user@]host prefix, try: scp ./file:\ name.mp4 user@host:”/path/to/dest” Using relative (e.g. ./) or fully qualified paths (/path/to/source) prevents this behaviour – the presence of / before a : causes OpenSSH to stop checking for a possible host: or user@host: prefix). OpenSSH’s scp only special-cases … Read more

Why is copying a directory with Ansible so slow?

TLDR: use synchronize instead of copy. Here’s the copy command I’m using: – copy: src=testdata dest=/tmp/testdata/ As a guess, I assume the sync operations are slow. The files module documentation implies this too: The “copy” module recursively copy facility does not scale to lots (>hundreds) of files. For alternative, see synchronize module, which is a … Read more

How to download a file from my server using SSH (using PuTTY on Windows)

There’s no way to initiate a file transfer back to/from local Windows from a SSH session opened in PuTTY window. Though PuTTY supports connection-sharing. While you still need to run a compatible file transfer client (pscp or psftp), no new login is required, it automatically (if enabled) makes use of an existing PuTTY session. To … Read more

SCP doesn’t work when echo in .bashrc?

Using echo in a .bashrc will break scp, as scp expects to see its protocol data over the stdin/stdout channels. See https://bugzilla.redhat.com/show_bug.cgi?id=20527 for more discussion on this issue. There’s a few workarounds available: Condition on the ‘interactive’ flag (e.g. case $- in *i* as suggested by tripleee) Use the tty utility to detect an interactive … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)