You probably want to copy the `/etc/ssh/temp.out` back over `/etc/ssh/sshd_config` at some point?  You should also be using `mktemp` to create your temporary file (to prevent clashes with existing files of the same name).

Alternatively (and probably preferably) you can use `sed -i` to do inline replace.