Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Network Services»SSH»How to Install or Update OpenSSH Server on Debian Linux

    How to Install or Update OpenSSH Server on Debian Linux

    RahulBy RahulAugust 21, 20152 Mins ReadUpdated:February 4, 2019

    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.

    Install or Update OpenSSH on Debian

    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.
      Port 2222
      
    • 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
      PermitRootLogin no
      

    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
    
    OpenSSH openssh server SSH
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install Libreoffice 6.2 on Ubuntu 18.04 & 16.04 via PPA
    Next Article How to Clone Git Repositoty and Add New Files

    Related Posts

    How to Create SFTP User in Ubuntu 22.04 (No Shell Access)

    Updated:June 14, 20224 Mins Read

    (Resolved) userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms

    Updated:May 10, 20221 Min Read

    Adding a New SSH Key in GitHub

    Updated:April 1, 20223 Mins Read

    How to Create SFTP Only User in Debian 11

    Updated:September 26, 20214 Mins Read

    How to Disable Strict Host Key Checking in SSH

    Updated:September 25, 20212 Mins Read

    How To Set Up SSH Keys in Linux

    5 Mins Read

    2 Comments

    1. Arvind Kumar on September 25, 2019 1:34 pm

      There is no information about “Update”. Why do you mention in the title when you don’t post information on something.

      Reply
      • Rahul on September 26, 2019 10:56 am

        Hi Arvind, If the older version of Openssh is already installed, then the package manager will automatically update to the latest available version.

        Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How To Install Docker on Ubuntu 22.04
    • How to Install Bower on Ubuntu 22.04 & 20.04
    • How to run “npm start” through Docker
    • Filesystem Hierarchy Structure (FHS) in Linux
    • How to accept user input in Python
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.