For some reason i can't update ubuntu to a newer version.
So I am forced to use Ubuntu 8.04.
How can I update only openssh from a 4.7 to a 5.X version ?
Download OpenSSH source. configure it to install to some private directory:
Now prepend /usr/local/ssh/sbin and /usr/local/ssh/bin in your $PATH. Now when you call ssh, you run the new binary.
Disable sshd in the box (I do not know whether sshd in Ubuntu 8.04 uses upstart or the older rc.* method). Then start (the new) sshd from /etc/rc.local (in case you want the machine to run the latest sshd).