Enable SSH Ubuntu: Step-by-Step Guide
To enable or disable SSH service on Ubuntu, you can follow these steps:
Enable SSH service.
- Open the terminal (Ctrl + Alt + T).
- Run the following command to install an SSH server:
- Update your system and install the openssh-server package using the apt command.
- Once the installation is complete, the SSH service will automatically start. You can check the status of the SSH service using the following command.
- Check the status of ssh service using systemctl command with sudo.
- If it shows as “active (running)”, it means that the SSH service has been successfully started.
Disable the SSH service.
- Open the terminal (Ctrl + Alt + T).
- Execute the following command to stop the SSH service:
- Please stop the SSH service using the following command: sudo systemctl stop ssh.
- You can check the status of the SSH service using the following command to ensure that the SSH service is stopped.
- Check the status of OpenSSH using the systemd service manager.
- If it displays as “inactive (dead)”, it means the SSH service has been successfully stopped.
Please note that if you disable the SSH service, other computers will not be able to connect to your Ubuntu system through SSH.