ubuntu installs ssh and starts on boot
1. Install openssh-serversudo apt-get install openssh-server
Start
sudo service ssh start
Query service startup status:
sudo ps -e | grep ssh
or
sudo service ssh status
2. Start the ssh command automatically when booting. sudo systemctl enable ssh
3. Turn off the ssh boot command. sudo systemctl disable ssh
4. Turn on ssh once. sudo systemctl start ssh
5. Turn off ssh once. sudo systemctl stop ssh
6. Restart the system after setting. reboot
7. Check whether ssh is started. You will see Active: active (running). Indicates successsudo systemctl status ssh