SSH does not run on the serial port, it runs a getty directly. You can interact with it in any program that can talk to a serial device like using [pyserial with python][1]. Using this you can open a serial connection and sent it the characters you would normally type to interact with the getty. You can read and parse responses as well to make it less error prone. But this is just scripting an interactive prompt, it is not the most reliable way to set up a pi. For example, if a character gets drop (which can happen on a serial line) then it can mess up the commands you are trying to enter. If you are on or have a linux system available (use can use virtualbox and vagrant to easily create one) it is better to chroot into the image and set it up from your main pc. See [this guide][2] for more detailed instruction on how to do this with the archlinuxarm image, though the steps are similar for raspbian (mostly you can skip to the chroot steps). Also [this guide][3] for a more detailed explication of creating the chroot. [1]: https://pythonhosted.org/pyserial/shortintro.html#opening-serial-ports [2]: http://disconnected.systems/raspberry-pi-archlinuxarm-setup/ [3]: https://raspberrypi.stackexchange.com/questions/855/is-it-possible-to-update-upgrade-and-install-software-before-flashing-an-image