CentOS System SSH Service opening method

Source: Internet
Author: User
Tags ssh centos linux mint


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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.