Skip to content

Instantly share code, notes, and snippets.

@linuxbiekaisar
Last active March 19, 2020 17:00
Show Gist options
  • Save linuxbiekaisar/c2a72a8a94bbc7e214197d19530519b7 to your computer and use it in GitHub Desktop.
Save linuxbiekaisar/c2a72a8a94bbc7e214197d19530519b7 to your computer and use it in GitHub Desktop.
Install, Start/Stop/Restart/Status Openssh
# 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