OpenSSH is the most popular ssh server for Linux-based systems. It is used to connect the server securely from remote systems having ssh clients. this article will help you to install the OpenSSH server on Debian Linux systems.
Step 1 – Install/Update OpenSSH Server
The latest OpenSSH Debian packages are available under default Apt repositories for the Debian systems. You can simply update Apt-cache and install the OpenSSH server using the following commands. If OpenSSH already installed, it will be updated to the latest version.
sudo apt-get update sudo apt-get install openssh-server
Step 2 – Configure OpenSSH (optional)
OpenSSH main configuration file is /etc/ssh/sshd_config. After successful installing OpenSSH server on your system, you may need to make few changes to secure your server.
- Change Default Port – OpenSSH runs on default port 22. We recommend to change SSH port with other port.
- Disable Root Login – By default root user are allowed to ssh from remote clients, For security purpose we recommend to disable direct root access. Use any non root account for ssh and then switch ( su – ) to root account. To do this add “PermitRootLogin no” in ssh configuration file
For more details visit https://tecadmin.net/5-tips-to-secure-openssh-server/
Step 3 – Manage OpenSSH Service
After making all necessary changes restart the OpenSSH server using the following command
sudo service ssh restart sudo service ssh stop sudo service ssh stop