-
-
Save kngvamxx/eb48f975f29929c6561d6e2700e64ec9 to your computer and use it in GitHub Desktop.
Install, Start/Stop/Restart/Status Openssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Youtube: https://www.youtube.com/watch?v=wo5A6O8h6QY | |
#!/bin/sh | |
# Install openssh server: | |
$ sudo apt update | |
$ sudo apt upgrade | |
$ sudo apt install openssh-server | |
$ sudo systemctl status ssh | |
# Start openssh server: | |
$ sudo systemctl start ssh | |
# Enable openssh server: | |
$ sudo systemctl enable ssh | |
# Restart openssh server: | |
$ sudo systemctl restart ssh | |
# Restart ssh | |
$ sudo systemctl restart ssh | |
# Set PermitRootLogin yes: Change PermitRootLogin to yes and exit the file after Save it. | |
$ sudo nano /etc/ssh/sshd_config | |
# To enable SSH password authentication, you must SSH in as root to edit u/m file. Then, change the line PasswordAuthentication no | |
# to PasswordAuthentication yes. | |
$ sudo nano /etc/ssh/sshd_config | |
# After making that change, restart the SSH service by running the following command as root: | |
# To Set PermitEmptyPassword yes, login SSH in as root to edit u/m file. Then, change the line PermitEmptyPassword to and uncomment the line. Exit the file after after save it | |
$ sudo nano /etc/ssh/sshd_config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment