This guide explains how to restart the SSH service in Solaris 10 and Solaris 11. These steps will help ensure the SSH service is up and running smoothly.
If you’re looking for SSH restart commands for other Linux distributions, here’s a quick reference table:
Linux Distribution | Init System | Command to Restart SSH |
---|---|---|
Ubuntu 16.04 and later | systemd | sudo systemctl restart sshd |
CentOS/RHEL 7 and later | systemd | sudo systemctl restart sshd |
Debian 8 and later | systemd | sudo systemctl restart sshd |
Ubuntu 14.10 and earlier | Upstart | sudo restart ssh |
CentOS/RHEL 6 and earlier | SysVinit | sudo service sshd restart |
Debian 7 and earlier | SysVinit | sudo service sshd restart |
Now, let’s focus on Solaris.
Step 1: Check for SSH Installation
Solaris 10 and 11 typically include SSH by default, but it’s a good idea to confirm. Run:
$ pkginfo | grep -i ssh
If SSH is installed, it will be listed in the output.
Restarting SSH in Solaris 10
Step 2: Check SSH Status
Verify if SSH is running by checking its status:
$ svcs ssh
If the output shows “offline,” the service is not running.
Step 3: Enable SSH
To enable or restart the SSH service, use this command:
$ svcadm enable ssh
Step 4: Confirm SSH is Running
Run the status command again to confirm:
$ svcs ssh
If the output shows “online,” SSH is now active.
Restarting SSH in Solaris 11
Step 2: Check SSH Status
Check the SSH service status for Solaris 11:
$ svcs -l svc:/network/ssh:default
If the output indicates “offline,” the service is not running.
Step 3: Enable SSH
Start or restart the service with:
$ svcadm enable svc:/network/ssh:default
Step 4: Verify SSH is Active
Confirm the service is online by running the status command again:
$ svcs -l svc:/network/ssh:default
By following these steps, you can restart SSH in Solaris 10 or 11 with ease.
SSH is vital for secure communication between systems. Ensuring it runs properly minimizes risks and keeps your system secure.