ubuntu16.04 install ssh to boot up

ubuntu installs ssh and starts on boot

1. Install openssh-server
sudo 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 success
sudo systemctl status ssh

Guess you like

Origin blog.csdn.net/hyl999/article/details/108035692