Ubuntu Linux install OpenSSH server
To install OpenSSH server on Ubuntu Linux, you can use the apt package manager. Here are the steps to do this:
- Open the terminal and update the package list by running the following command:
sudo apt update- Install OpenSSH server by running the following command:
sudo apt install openssh-server- Verify that the SSH service is running by checking its status:
sudo systemctl status ssh- If the service is not running, you can start it by running the following command:
sudo systemctl start ssh- To make sure that SSH service starts automatically at boot time, run the following command
sudo systemctl enable ssh- To check the version of OpenSSH Server
ssh -V- To configure the SSH server, you can edit the
/etc/ssh/sshd_configfile. This file contains various options for configuring the SSH server, such as setting the port number and disabling password authentication. - To connect to your server via SSH, you can use the ssh command from your local machine:
ssh user@server_ipYou can also use the ssh-copy-id command to setup the public key authentication. This will allow you to log in to your server without entering your password every time.
