Post

Setting up a SSH server

Yet another guide on installing OpenSSH (Windows & Linux)

What is this post about?

This is just a quick post to supplement another. Sorry, but there’s not really anything groundbreaking or new here.

Windows

I’m mainly just rehashing the official guide, which contains the instructions:

  1. Open powershell
  2. Install the ssh client
    1
    
    Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
    
  3. Install the ssh server
    1
    
    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
    
  4. Start the server
    1
    
    Start-Service sshd
    
  5. Then enable it
    1
    
    Set-Service -Name sshd -StartupType 'Automatic'
    
  6. And optionally, open the firewall for ssh. This is not needed for tailscale if you are here from my remote desktop guide
    1
    2
    
    New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' `
      -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
    

Linux

This will mainly depend on your distribution, but 9/10 times, OpenSSH can be installed via your package manager.

In the case of Ubuntu, this is simply:

1
sudo apt install openssh-server

Then, you only need to enable & start the service:

1
sudo systemctl enable ssh --now

And you’re done!

This post is licensed under CC BY 4.0 by the author.

Trending Tags