will suffice. But please note, this will delete the account from the server. By piping yes into the script's execution you won't be able to confirm this and back out. As soon as you execute this account, the account will be deleted. I would advise to use this with caution.
The DNS is deleted by default. If you want to keep the DNS, pass n as the second parameter to killacct. Execute just:
i want to terminate accounts in SSH and remove the DNS zones. Is this correct?
will it delete the dns zones too?
There is a suggestion that also setup a monitoring script that will check entries of users from /etc/passwd as well, if user account not exists and its ssh account exists so you get alert for that particular user, hence this way you can keep secure your server from a mess, also take backup before terminating of any account, may be in future your client need that.