- package: tis-openssh-server
- name: OpenSSH Server
- version: 9.5.0.0-0
- categories: system
- maintainer: Bertrand Lemoigne, Tranquil IT
- target_os: windows
- impacted_process: sshd
- architecture: x64
- signature_date:
- size: 5.24 Mo
- homepage : https://github.com/PowerShell/Win32-OpenSSH/
package : tis-openssh-server
version : 9.5.0.0-0
architecture : x64
section : base
priority : optional
name : OpenSSH Server
categories : system
maintainer : Bertrand Lemoigne, Tranquil IT
description : OpenSSH Server
depends :
conflicts :
maturity : PROD
locale :
target_os : windows
min_wapt_version :
sources : https://github.com/PowerShell/Win32-OpenSSH/releases/latest
installed_size :
impacted_process : sshd
description_fr :
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor :
keywords :
licence :
homepage : https://github.com/PowerShell/Win32-OpenSSH/
package_uuid : 7a070f93-3ebd-41c4-9a83-cebf08cbb29d
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version : 10
max_os_version :
icon_sha256sum : 9420721210f5d9c50c9e35c9fdbf0a088b30e165df8311c5f2176ce60e122475
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : JSc7iXzrnVhhObU1UM80CAe/uJ4D3DEAgBnINL26nIUq7s/lBT+Zo5nOBLe1wQHW6vDeGLac79Uue9N8SVuj/bhjzbVT83szXV+gMuavEOlCNhScLhpjbWQbHr/pV655PFcUUlz2Pjs5CW28X83b5szi6qiSFP3tARrYtLAjB8oqrcEiBRC7v9CC5bahNBsa5+g4iNgEXKhzApLt8I1/LCa8NQEXxKvBTBKVDUMk9IE+n7Cwxg6IKMGWKVi31jNbxW0lNfoHuVanqVbzQGJ+ENNH4Hn9a5DIL/3/ROtOz4zBS57Yw9MU20fknzFjbEA4N3jwqQq8/0DI1vehT7p7WQ==
signature_date : 2024-06-22T20:03:23.422143
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
# -*- coding: utf-8 -*-
from setuphelpers import *
r"""
Please replace public keys in authorized_keys list before building and installing this package:
"""
##authorized_keys = ['ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCy9f0/nwkXESzkL4v4ftZ24VJYvkQ/Nt6vsLab3iSWtJXqrRsBythCcbAU6W95OGxjbTSFFtp0poqMcPuogocMR7QhjY9JGG3fcnJ7nYDCGRHD4zfG5Af/tHwvJ2ew0WTYoemvlfZIG/jZ7fsuOQSyUpJoxGAlb6/QpnfSmJjxCx0VEoppWDn8CO3VhOgzVhWx0dcne+ZcUy3Kkt3HBQN0hosRfqkVSRTvkpK4RD8TaW5PrVDe1r2Q5ab37TO+Ls4xxt16QlPubNxWeH3dHVzXdmFAItuH0DuyLyMoW1oxZ6+NrKu+pAAERxM303gejFzKDqXid5m1EOTvk4xhyqYN user@host',
## 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDmak4Wu23RZ6XmN94bOsqecZxuTa4RRhhQmHmTZjMB7HM57/90u/B/gB/GhsPEu1nAXL0npY56tT/MPQ8vRm2C2W9A7CzN5+z5yyL3W01YZy3kzslk77CjULjfhrcfQSL3b2sPG5jv5E5/nyC/swSytucwT/PE7aXTS9H6cHIKUdYPzIt94SHoBxWRIK7PJi9d+eLB+hmDzvbVa1ezu5a8yu2kcHi6NxxfI5iRj2rsceDTp0imC1jMoC6ZDfBvZSxL9FXTMwFdNnmTlJveBtv9nAbnAvIWlilS0VOkdj1s3GxBxeZYAcKbcsK9sJzusptk5dxGsG2Z8vInaglN6OaOQ7b7tcomzCYYwviGQ9gRX8sGsVrw39gsDIGYP2tA4bRr7ecHnlNg1b0HCchA5+QCDk4Hbz1UrnHmPA2Lg9c3WGm2qedvQdVJXuS3mlwYOqL40aXPs6890PvFJUlpiVSznF50djPnwsMxJZEf1HdTXgZD1Bh54ogZf7czyUNfkNkE69yJDbTHjpQd0cKUQnu9tVxqmBzhX31yF4VcsMeADcf2Z8wlA3n4LZnC/GwonYlq5+G93zJpFOkPhme8c2XuPuCXF795lsxyJ8SB/AlwPJAhEtm0y0s0l1l4eWqxsDxkBOgN+ivU0czrVMssHJEJb4o0FLf7iHhOW56/iMdD9w== userName']
authorized_keys = []
def install():
# Installing the software
install_msi_if_needed('OpenSSH-Win64-v9.1.0.0.msi')
run_powershell(r'[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::Machine) + ";" + ${Env:ProgramFiles} + "\OpenSSH", [System.EnvironmentVariableTarget]::Machine)')
run_powershell('Start-Service sshd')
run_powershell("Set-Service -Name sshd -StartupType 'Automatic'")
for key in authorized_keys:
run_powershell(rf'Add-Content -Force -Path C:\ProgramData\ssh\administrators_authorized_keys -Value "{key}"')
run_powershell(r'icacls.exe "C:\ProgramData\ssh\administrators_authorized_keys" /inheritance:r /grant "*S-1-5-32-544:F" /grant "*S-1-5-18:F"')
# -*- coding: utf-8 -*-
from setuphelpers import *
from waptutils import get_sha256
import json
def update_package():
package_updated = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
api_url = "https://api.github.com/repos/PowerShell/Win32-OpenSSH/releases/latest"
os_dict = {"windows": ".msi", "linux": ".AppImage", "darwin": ".dmg"}
arch_dict = {"x64": "win64.exe", "x86": "win32.exe"}
# Getting latest version information from official sources
print("API used is: %s" % api_url)
json_load = json.loads(wgets(api_url, proxies=proxies))
for file in json_load['assets']:
if 'Win64' in file['name'] and 'msi' in file['name']:
download_url = file["browser_download_url"]
version = json_load["tag_name"].split("-")[-1].replace("v", "")
latest_bin = file["name"]
break
# Downloading latest binaries
print("Latest %s version is: %s" % (control.name, version))
print("Download URL is: %s" % download_url)
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
else:
print("Binary is present: %s" % latest_bin)
# Checking version from file
version_from_file = get_version_from_binary(latest_bin).split("-")[0]
# if not version_from_file.startswith(version) and version_from_file != '':
if Version(version_from_file) != Version(version) and version_from_file != "":
print("Changing version to the version number of the binary")
os.rename(latest_bin, latest_bin.replace(version, version_from_file))
version = version_from_file
else:
print("Binary file version corresponds to online version")
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
package_updated = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.set_software_version(version)
control.save_control_to_wapt()
# Deleting outdated binaries
remove_outdated_binaries(version)
# Validating update-package-sources
return package_updated
f5a79bbc7bdb72c878add1d1708dfcaecf843ab27ced9da2815180e39c1166dc : setup.py
b1924b984fe583f8ba2e477b6773c2352347b51b8a2dc831b340b69ec1e91abe : update_package.py
6333f5b38313360a2c960ea7afa3086002f479bad663f20f92a4889063fe925c : OpenSSH-Win64-v9.5.0.0.msi
9420721210f5d9c50c9e35c9fdbf0a088b30e165df8311c5f2176ce60e122475 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
ae1cd14b986fe613dbca2075fb2fd8430e32b588a6e1e5eda82b654ef254e0bd : luti.json
8a044aba9cf71cc94fc944c80184afa0066223a870b762164f56e63f18e19ff3 : WAPT/control