Skip to content

Instantly share code, notes, and snippets.

@tommypratama
Last active May 16, 2024 01:10
Show Gist options
  • Select an option

  • Save tommypratama/f96899f133ee885ed56f0aa1bf4e46d3 to your computer and use it in GitHub Desktop.

Select an option

Save tommypratama/f96899f133ee885ed56f0aa1bf4e46d3 to your computer and use it in GitHub Desktop.

Revisions

  1. tommypratama revised this gist Mar 29, 2019. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions install_ssh_ubuntu.md
    Original file line number Diff line number Diff line change
    @@ -2,25 +2,25 @@
    # Install SSH server on Ubuntu

    1. Update apt's package list from the repository
    `sudo apt-get update`
    * `sudo apt-get update`

    2. Install openssh-server package.
    `sudo apt-get install -y openssh-server`
    * `sudo apt-get install -y openssh-server`

    3. ssh service should be started and enabled by default after installation. Check to confirm.
    `sudo systemctl status ssh`
    * `sudo systemctl status ssh`

    4. Start the ssh service if it's not already started.
    `sudo systemctl start ssh`
    * `sudo systemctl start ssh`

    5. You can disable ssh from running by default during system boot.
    `sudo systemctl disable ssh`
    * `sudo systemctl disable ssh`

    6. To enable it back again, run the following command.
    `sudo systemctl enable ssh`
    * `sudo systemctl enable ssh`

    7. Configure SSH server options by editing the configuration file using your favorite editor.
    `sudo nano /etc/ssh/sshd_config`
    * `sudo nano /etc/ssh/sshd_config`

    8. SSH service will need to be restarted or reloaded for the changes to take effect.
    `sudo systemctl restart ssh`
    * `sudo systemctl restart ssh`
  2. tommypratama created this gist Mar 29, 2019.
    26 changes: 26 additions & 0 deletions install_ssh_ubuntu.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@

    # Install SSH server on Ubuntu

    1. Update apt's package list from the repository
    `sudo apt-get update`

    2. Install openssh-server package.
    `sudo apt-get install -y openssh-server`

    3. ssh service should be started and enabled by default after installation. Check to confirm.
    `sudo systemctl status ssh`

    4. Start the ssh service if it's not already started.
    `sudo systemctl start ssh`

    5. You can disable ssh from running by default during system boot.
    `sudo systemctl disable ssh`

    6. To enable it back again, run the following command.
    `sudo systemctl enable ssh`

    7. Configure SSH server options by editing the configuration file using your favorite editor.
    `sudo nano /etc/ssh/sshd_config`

    8. SSH service will need to be restarted or reloaded for the changes to take effect.
    `sudo systemctl restart ssh`