Here's how to flush DNS from the terminal (linux)
Open a terminal and login to the server via SSH
Then type the command:
user@host:~$ su Password: <type your root password>
Then restart the service
root@host: /etc/init.d/nscd restart
If this last step is not possible, it is probably because nscd has not been installed. Please install it through your terminal. For Debian linux and its derivatives, you can use the command:
sudo apt-get install nscd
If it has been installed you can repeat it with the command
root@host: /etc/init.d/nscd restart