How to upload a sketch from any PC of the same LAN

Hi, I've been searching through the net for some days, in order to discover how I could easily upload a sketch to an Arduino that is not phisically connected to my PC, but instead that is connected to an another one, that belongs to the same LAN. I mean:

PC1-SERVER Arduino Uno is connected to this PC with classic USB cable. This PC is running Ubuntu linux, and sees Arduino as a serial port /dev/ttyACM0.

PC2-CLIENT This is the PC where I create and compile the sketch. I want to upload the sketch to the Arduino Uno described above (so, connected to SERVER, port /dev/ttyACM0)

SOLUTION: server-side commands:

sudo apt-get install ssh-server ser2net

sudo passwd root    (to set the root password)

sudo reboot

client-side commands (assuming 192.168.0.7 as IP address of SERVER):

ssh -n -L 8086:localhost:8086 root@192.168.0.7 \
   '/usr/sbin/ser2net -d -C "8086:raw:600:/dev/ttyACM0:115200 NONE 1STOPBIT \
   8DATABITS -XONXOFF LOCAL -RTSCTS HANGUP_WHEN_DONE "' &

NOTE: -n option and the final & are used to allow ssh running in background. You can verify that ssh is working by executing the command "jobs" in your terminal.

you can then upload sketches to arduino doing this:

avrdude -C /path/to/avrdude.conf -p atmega328p -c arduino -P net:localhost:8086 -U flash:w:/path/to/file.hex:i

NOTE: In Eclipse, if you are using the arduino plugin, just place "net:localhost:8086" in the configuration panel, where "port:" field is required.

Hoping theese tricks will help people like me in the future to find easily a solution instead of getting around the entire web for few and uncomplete tips, I have thought to write on the official arduino forum the solution I've found.

Patrick Roncagliolo (ronca.pat@gmail.com)