There is a file prepared for that:
Code:
/etc/init.d/ssh
Run it on boot isn't wise, because you may boot sometimes without networking.
There are several runlevels, by convention:
Code:
S   SingleUser rescue mode (or Superuser?)
1    Single user without networking
2    Multi user wo. net
3    Multiuser + networking (here we need ssh)
4    ? reserved for special purpose
5    Multiuser + net + X11 (here too)
6    Reboot
...
For every level there is a rcX.d - directory, usually in /etc or in a subdir of /etc
(Replace the X with S, 1...6)
If you switch the runlevel, for the level you leave its kill-Scripts are called, and for the new, its Start-scripts are called.
Surprisingly, both scripts, the kill script and the start scripts are identical!
How's that?
Well - they are called with a parameter, which they evaluate.
Code:
fooManShoe -start
fooManShoe -stop
If you switch to runlevel 3 or 5, you need the start-script to be called, and if you leave them, the Kill-scripts should be called.
Therefore you create a symbolic link from the /etc/init.d/ssh to /etc/rc3.d/S44ssh and to rc5 accordingly.
The number - 44 in my example, decides the order in which the scripts are called. Lower numbers first.
I don't know if ssh needs a kill-script, if yes, you would use /etc/rc3.d/K44ssh too.

There is a graphical tool, which does this in a userfriendly way.
SysVinit or something similiar.

In either way, you have to be root to do this.