Under Ubuntu open SSH service

Source: http: //blog.sina.com.cn/s/blog_7c2374190100tyc9.html

 

Ubuntu SSH open at first to confirm whether you have configured the IP, if you do not use the following command is executed:

  1.sudo ifconfig eth0 192.168.0.3 Netmask 255.255.255.0 ip address and subnet mask // configure your network card eth0
  2. duso route default gw 192.168.0.1 // configure your default route

open ssh service
1. Check whether there sshd_config
   CAT / etc / ssh / sshd_config sshd_config file to see if there //
2. If you do not install
    install openssh- sudo apt-get Server-server // install SSH, Ubuntu default install openssh-client, if you do not install, can be installed with apt-get install.
3. Check whether the start // sshsever installed sshserver, you can restart the computer
   PS -e | grep SSH 
   ? SSH-1207 00:00:00 Agent
 ? 21834 00:00:00 sshd
   If you see sshd has said sshserver start, if only ssh-agent, said that does not start with
   sudo /etc/init.d/ssh start start sshserver
4.ssh-server configuration file located in / etc / ssh / sshd_config, where you can define the SSH service port, the default port is 22, you can define your own into a different port number, such as 222. Then restart the SSH service with the following command:
    the sudo /etc/init.d/ssh the restart
5. The sudo netstart -tlp may also be used to detect the command, if saw:
    TCP6 0 0 [::]: SSH [::]: *
    He says sshserver start properly.
   By the client you can visit.

Reproduced in: https: //www.cnblogs.com/stevenzeng/p/5154853.html

Guess you like

Origin blog.csdn.net/weixin_33757609/article/details/93881060