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