Skip to content

Commit b034ce3

Browse files
author
Louis Bouchard
committed
feat(instances): Fix error message in scw-fetch-ssh-keys in windows images
1 parent 301d4ae commit b034ce3

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
meta:
3+
title: Fix error when fetching SSH keys on Windows Server 2022
4+
description: This page helps you fix the error message when fetching ssh keys on Windows Server 2022
5+
content:
6+
h1: Fix error when fetching SSH keys on Windows Server 2022
7+
paragraph: This page helps you fix the error message when fetching ssh keys on Windows Server 2022
8+
tags: windows server 2022 ssh-key
9+
dates:
10+
validation: 2025-02-06
11+
posted: 2023-02-06
12+
categories:
13+
- compute
14+
---
15+
16+
After enabling the OpenSSH server on Windows Server 2022 and Windows Server 2022 Core instances you will
17+
need to fetch the SSH keys of your project using `Scw-Fetch-SSH-Keys`. When running this command for the
18+
first time, you will see the following error message displayed :
19+
20+
```
21+
PS C:\Users\Administrator> Scw-Fetch-SSH-Keys
22+
Remove-Item : Cannot find path 'C:\ProgramData\ssh\administrators_authorized_keys' because it does not exist.
23+
At C:\Program Files\WindowsPowerShell\Modules\ScalewayEcosystem\0.0.10.3\ScalewayEcosystem.psm1:54 char:2
24+
+ Remove-Item $authorized_keys
25+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26+
+ CategoryInfo : ObjectNotFound: (C:\ProgramData\...authorized_keys:String) [Remove-Item], ItemNotFoundEx
27+
ception
28+
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
29+
30+
processed file: c:\ProgramData\ssh\administrators_authorized_keys
31+
Successfully processed 1 files; Failed processing 0 files
32+
```
33+
The ssh keys will still be fetched, but this message may appear again if the file
34+
C:\ProgramData\ssh\administrators_authorized_keys if deleted.
35+
36+
To avoid this message, simply update the `ScalewayEcosystem` package using the folllowing
37+
commands :
38+
```
39+
Register-PSRepository -Name NuGet -SourceLocation https://api.nuget.org/v3/index.json -PublishLocation https://api.nuget.org/v3/index.json -InstallationPolicy Trusted
40+
Update-Module ScalewayEcosystem
41+
Remove-Module ScalewayEcosystem
42+
Import-Module ScalewayEcosystem
43+
```
44+

0 commit comments

Comments
 (0)