SSH is a remote login service similar to Telnet, but faster/safer than Telnet.
1. View the status of the SSH service
Enter the following command:
Root user directly
Service sshd Status
Front of non-root user plus sudo
sudo service sshd status
If you appear
Loaded:error (reason:no such file or directory)
If prompted, say the name does not have SSH service installed, follow the second step: Install SSH service.
If you appear
Active:inactive (dead) or Openssh-daemon is stopped
The SSH service is installed, but is not turned on. Follow the third step: open SSH service.
2 Installing SSH Service
To install the SSH command:
If you are using a series of Linux distributions such as Redhat,fedora,centos, type the following command:
sudo yum install sshd
Or
sudo yum install Openssh-server
If you are using a series of Linux distributions such as Debian,ubuntu,linux Mint, type the following command:
sudo apt-get install sshd
Or
sudo apt-get install openssh-server (provided by the OSC User Fire ear)
Then follow the prompts and install it.
3. Open SSH Service
In the terminal, typing the following command:
sudo service sshd start
After you finish the command, use the first step: View the commands for the SSH service status, if the following prompts
Active:active (running) since Sun 2013-04-07 13:43:11 CST; 15s ago
Indicates that your SSH service has been activated. If you fail, try uninstalling (see step Sixth: Uninstalling the SSH Service) and installing (Part II: Installing SSH Service).
4. Use SSH service
Using the SSH service, as with the FTP service, it is recommended to install putty (a remote login tool) to log on to the local host. Install the command and the second step: Install SSH service is the same, just replace the sshd into putty can.
When the installation putty is complete, use the following command to log in remotely:
Putty Ip/hostname
Where Ip/hostname is the IP address or host name of your SSH host
For example, my IP address is 192.168.1.103, then I can use Putty 192.168 1.103来 to log on to my host.
5. Uninstall SSH Service
If you are using a series of Linux distributions such as Redhat,fedora,centos, type the following command:
sudo yum remove sshd
If you are using a series of Linux distributions such as Debian,ubuntu,linux Mint, type the following command:
sudo apt-get–purge remove sshd
You will then be prompted for the uninstall to complete.