-
Update apt's package list from the repository
sudo apt-get update
-
Install openssh-server package.
sudo apt-get install -y openssh-server
-
ssh service should be started and enabled by default after installation. Check to confirm.
sudo systemctl status ssh
-
Start the ssh service if it's not already started.
sudo systemctl start ssh
-
You can disable ssh from running by default during system boot.
sudo systemctl disable ssh
-
To enable it back again, run the following command.
sudo systemctl enable ssh
-
Configure SSH server options by editing the configuration file using your favorite editor.
sudo nano /etc/ssh/sshd_config
-
SSH service will need to be restarted or reloaded for the changes to take effect.
sudo systemctl restart ssh
-
-
Save duTianze/0e831ad447339762e26ff67507c3e897 to your computer and use it in GitHub Desktop.
Install SSH server on Ubuntu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment