Install, start, and uninstall SSH

Source: Internet
Author: User
Tags ssh port

Install, start, and uninstall SSH

Uninstall SSH;

Stop the SSH service first: sudo stop ssh

Check if SSH is stopped: ssh localhost

Check if SSH is Enabled: ps-e | grep ssh

Uninstall SSH: apt-get -- purge remove openssh-server -- purge indicates that the package should be completely cleared.


Install SSH:

Install SSH: sudo apt-get install openssh-server

Enable SSH: sudo start ssh

Detect SSH: ps-e | grep ssh

Modify the SSH port:

Edit the configuration file;

Find the configuration content Port 22 and change it to your desired value;

Restart the ssh service;

Verify that ssh-server is working properly: netstat-tlp
========================================================== ======================================
Start, stop, and restart SSH:
Sudo/etc/init. d/ssh start
Sudo/etc/init. d/ssh stop
Sudo/etc/init. d/ssh restart
Or
Sudo start ssh
Sudo stop ssh
Sudo restart ssh

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.