To install OpenSSH using PowerShell:
-
Run PowerShell as an Administrator.
-
Run the following cmdlet to make sure that OpenSSH is available:
PowerShellGet-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
The command should return the following output if neither are already installed:
PowerShellName : OpenSSH.Client~~~~0.0.1.0 State : NotPresent Name : OpenSSH.Server~~~~0.0.1.0 State : NotPresent
-
After that, run the following cmdlets to install the server or client components as needed:
PowerShell# Install the OpenSSH Client Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 # Install the OpenSSH Server Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Both commands should return the following output:
PowerShellPath : Online : True RestartNeeded : False
-
To start and configure OpenSSH Server for initial use, open an elevated PowerShell prompt (right-click, then select Run as an administrator), then run the following commands to start the
sshd service
:PowerShell# Start the sshd service Start-Service sshd # OPTIONAL but recommended: Set-Service -Name sshd -StartupType 'Automatic' # Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) { Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..." New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 } else { Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists." }
Once installed, you can connect to OpenSSH Server from a Windows or Windows Server device with the OpenSSH client installed. From a PowerShell prompt, run the following command.
ssh domain\username@servername
Once connected, you get a message similar to the following output.
The authenticity of host 'servername (10.00.00.001)' can't be established.
ECDSA key fingerprint is SHA256:(<a large string>).
Are you sure you want to continue connecting (yes/no)?
Entering yes adds that server to the list of known SSH hosts on your Windows client.
At this point, the service prompts you for your password. As a security precaution, the characters of your password aren't displayed as you enter them.
Once connected, you should see the following Windows command shell prompt:
domain\username@SERVERNAME C:\Users\username>
To uninstall the OpenSSH components using PowerShell, use the following commands:
# Uninstall the OpenSSH Client
Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
# Uninstall the OpenSSH Server
Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
If the service was in use when you uninstalled it, you should restart Windows.
- Подробности
- Категория: Заметки
Еще один способ автозапуска приложения - через ярлык. Сегодня нашел, не знал такого.
Создать, если нет такой, папку .config/autostart в /home (или /home/user вероятно для конкретного пользователя)
Туда скопировать нужный ярлык. Все заготовки ярлыков для всех установленных программ можно взять здесь /usr/share/applications
Ну далее просто отредактировать в свойствах строку автозапуска или в текстовом редакторе строчку командной строки добавив нужные параметры например --kiosk http://google.ru
- Подробности
- Категория: Заметки
Установка драйверов
git clone https://github.com/waveshare/LCD-show.git cd LCD-show/
chmod +x LCD35-show sudo ./LCD35-show или нужную версию драйвера
#X 0, 90, 180, and 270. Поворот экрана sudo ./LCD28-show X
- Подробности
- Категория: Заметки
В папке пользователя ~/.config/chromium/ удалить файлы 'SingletonCookie', 'SingletonLock' и SingletonSocket . Браузер откроется без потери настроек.
- Подробности
- Категория: Заметки