ubuntu install ssh service

1 Check whether the system is installed with ssh service

ssh localhost

 If the following prompt appears, it means that it has not been installed

ssh: connect to hostlocalhost port 22: Connection refused

 2 Install ssh service

If you see that sshserver is not installed through the above steps, type the following command to install

sudo apt-get install –y openssh-server

 3  After the installation is complete, start ssh

service ssh start

 4  After the startup is complete, you can use the command: ps –e | grep ssh to view the ssh status

root      2031     1  0 02:53 ?        00:00:00 /usr/sbin/sshd -D

 indicates that the startup is successful

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326319189&siteId=291194637