Zum Inhalt springen

Services/SSH/Windows

Aus Technik-Wiki

OpenSSH client on Windows

Installing the client

Via graphical interface (Windows 11)

Windows 11 - Install OpenSSH client
  1. Open the Settings and search for optional features in the search bar, then select the corresponding item.
  2. At the top, under the section Add an optional feature, click the button View features.
  3. In the dialog, search for openssh-client (If OpenSSH-Client does not appear as a search result, it is already installed).
  4. Select OpenSSH-Client and click Next.
  5. Click Install and wait for the process to complete.

Via command line

  1. Right-click on the Start menu and then select Terminal (Administrator).
  2. Execute the following command in the command line: Add-WindowsCapability -Online -Name OpenSSH.Client

ssh-agent

To avoid entering the passphrase for your private key every time, you can add your private keys to the Windows ssh-agent. First, the corresponding Windows service must be started:

Via graphical interface (Windows 11)

Windows 11 - Enable ssh-agent
  1. Right click the Start button and select Computer management.
  2. On left under Services and Applications select Services.
  3. Find the service the name OpenSSH Authentication Agent in the list.
  4. Right click the service and select Properties.
  5. On the General tab
    1. Set the option Startup type to Automatic.
    2. Click Apply.
    3. Under Service status click the Start button.
  6. Close the dialogue with OK.

Via command line

  1. Right click the start button and select Windows PowerShell (Admin).
  2. In the command line run the following commands:
    1. To set the service to start when Windows boots: Get-Service ssh-agent | Set-Service -StartupType Automatic
    2. To start the service immediately: Start-Service ssh-agent
    3. To check if the service is running: Get-Service ssh-agent

After that, private keys can be added using the command ssh-add (no administrator rights are required).