Makefile error make (e=2): The system cannot find the file specified

The error process_begin: CreateProcess(NULL, pscp blob.txt username@hostname:/folder/, …) failed. make (e=2): The system cannot find the file specified. is almost certainly complaining that Windows cannot find pscp. This is almost certainly because the value of %PATH% (or whatever) is different when make spawns a shell/console then when you have it open manually. Compare the values … Read more

PuTTY configuration equivalent to OpenSSH ProxyCommand

If you want to “jump a host”, then using “local proxy command” is an overkill. Recent versions of PuTTY have this build-in. Go to Connection > Proxy, and in “Proxy type”, select “SSH to proxy and use port forwarding”. Then specify the details of the intermediate server below (like Hostname, Port, Username, Password [or load … Read more

Commandline overwrites itself when the commands get too long

I’ve just solved this myself. It was just some color escapes in the PS1 command prompt: LTGREEN=”\033[40;1;32m” LTBLUE=”\033[40;1;34m” CLEAR=”\033[0m” LIGHT_GRAY=”\033[40;1;33m” export PS1=”$LTGREEN\u$LTBLUE@\h:$LIGHT_GRAY\w$CLEAR ❯ ” The issue is that the color literals are not enclosed in brackets. Placing escaped brackets around them fixes the issue entirely: LTGREEN=”\[\033[40;1;32m\]” LTBLUE=”\[\033[40;1;34m\]” CLEAR=”\[\033[0m\]” LIGHT_GRAY=”\[\033[40;1;33m\]” export PS1=”$LTGREEN\u$LTBLUE@\h:$LIGHT_GRAY\w$CLEAR ❯ ” Hope this … Read more

Best way to script remote SSH commands in Batch (Windows)

The -m switch of PuTTY takes a path to a script file as an argument, not a command. Reference: https://the.earth.li/~sgtatham/putty/latest/htmldoc/Chapter3.html#using-cmdline-m So you have to save your command (command_run) to a plain text file (e.g. c:\path\command.txt) and pass that to PuTTY: putty.exe -ssh user@host -pw password -m c:\path\command.txt Though note that you should use Plink (a … Read more

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