I haven't tested it, but it might be possible. When you upload a sketch, it is stored in the /sketch directory as a file named "sketch.elf". You might want to try copying a new compiled sketch through SCP under the directory /sketch, delete the old sketch.elf file and rename the new one to "sketch.elf". Then you can try running this new sketch.
As I said, I haven't tested it but I encourage you to try it and post your results.
Thanks for you response. I did try but it doesn't work, I get:
root@galileo:~# cp build6955031346436128377.tmp/adafruit_adc.cpp.elf /sketch/sketch.elf
root@galileo:~# cd /sketch/
root@galileo:/sketch# chmod +x sketch.elf
/sketch/sketch.elf: cache '/etc/ld.so.cache' is corrupt
I tested it and I was able to run the new sketch transfered through SCP. I copied the new sketch in the /sketch directory with the name "sketch.elf". Then I rebooted the board and the sketch started once the board booted.
Warmour, download this excellent free ebook: Intel Galileo and Intel Galileo Gen 2 - API Features and Arduino Projects for Linux Programmers
In one of the chapters there is a step by step "how to hack arduino ide script" guide to upload sketches to galileo/edison with scp.