Hi, you should remove /etc/ssh/*{_key,_key.pub} as one of the final steps of template creation. I'm currently not sure if debian's openssh-server init automatically regenerates the server keys. If not a (to be written) "first-boot' init should call dpkg-reconfigure openssh-server to get the keys regenerated.
Anyway, some housekeeping tasks (like removing .bash_history, /var/log/* ...) should be done anyway during template creation. Here's what we do after template creation/update: https://github.com/HeinleinSupport/acs-template-scripts/blob/master/deb ian8/root/newtemplate.sh Am Sonntag, den 14.08.2016, 22:40 +0300 schrieb Mindaugas Milinavičius: > Hello, > > does anyone create template for Debian 8.5? > > I can create, but after server is booted, do not working SSH becau > se of > invalid rsa key. > > Hostname changed, password also changed. > > The solution is onlye to reinstall openssh-server to get started, but > how > to do it on boot from template? > > Does anyone have solution?