Enable the SSH service
The SSH service is applicable to all UNIX-like systems, such as Ubuntu, CentOS, and RedHat, including Mac OX. Here we will briefly introduce some of its applicable methods.
First, we will introduce Mac OX. Because SSH is embedded on the Apple system, you don't need to install anything. You just need to set it up:
-> System Preference-> Sharing-> Remote Login (checked ).
Next, let's continue to introduce the installation and use of the Linux SSH service.
SSH is divided into client openssh-client and openssh-server. The system environment I use is Ubuntu14.04.1. The client is installed by default, and no server
If the client is not installed, run the following command to install it:
sudo apt-get install openssh-client
If you need to open the local machine so that users can log on remotely, you must install openssh-server. You can also run the following command to install openssh-server:
sudo apt-get install openssh-server
After the installation is complete, you can run the following command to check whether the SSHServer has been started:
ps -e |grep ssh
If you see sshd, it indicates that the ssh-server has been started.
If it is not started, run the following command:
sudo /etc/init.d/ssh start
Or
service ssh start
Stop Service command:
sudo /etc/init.d/ssh stop
Or
service ssh stop
Then use the following method to log on to SSH:
ssh username@192.168.1.112
If username is 192.168.1.112, enter the password.
Disconnect and enter exit at the terminal.