The Cryptographic Daemon Reset Vector
The SSH (Secure Shell) daemon is the primary architectural gateway for administrating an Ubuntu server remotely. When you execute a security modification—such as changing the default Port 22 to a randomized number, or disabling password authentication in favor of strict RSA key pairs—you must alter the `sshd_config` file. However, the Linux kernel will mathematically ignore these changes while the current daemon remains active in RAM. You must manually execute a service interruption, forcing the daemon to terminate and rebuild itself using the new security parameters.
How to Restart the SSH Service
Modern Ubuntu deployments utilize the `systemd` initialization architecture. You must use the `systemctl` command to forcefully reboot the specific `sshd` process without rebooting the entire physical server hardware.
1. Open your terminal application and connect to the server via your current, functioning SSH connection.
2. The Configuration Verification (Pre-Flight Check):
* Critical Warning: If you made a typographical error in the `sshd_config` file, restarting the service will permanently lock you out of the server.
* You must instruct the daemon to verify its own code before you pull the plug.
* Type: sudo sshd -t
* Press Enter. If the command returns absolutely nothing (a blank line), your configuration syntax is mathematically perfect. If it returns an error line, you must open the config file and fix the typo before proceeding.
3. The Execution Command (`systemctl`):
* Because you are manipulating the core security gateway, you must possess root privileges.
* Type the following exact command:
sudo systemctl restart sshd (Note: In Ubuntu, both `ssh` and `sshd` generally point to the same service).
* Press Enter and provide your administrative password.
4. The Continuity Handshake:
* Unlike restarting the network manager, restarting `sshd` is specifically engineered not to terminate your currently active terminal session. Your screen will not freeze, and you will not be disconnected.
* The system simply drops a new, updated daemon instance into RAM to handle all future connections.
5. Verification (The Status Check):
* To verify the new daemon is active and listening for new handshakes, type:
sudo systemctl status sshd
* Look for the text `Active: active (running)`. If the timestamp confirms it started seconds ago, the reboot was a complete success. Press q to exit.