Installing Microsoft OpenSSH on Windows 7

Published (last updated )

This is Google’s cache of https://fred151.net/site/2018/09/23/how-to-install-openssh-on-windows-7-10/. It is a snapshot of the page as it appeared on 27 Jul 2023 20:20:50 GMT. The current page could have changed in the meantime.

How to install OpenSSH on Windows 7 / 10

Use SSH on Windows, how running/launching graphical programs on remote computer in the same user session logon on Windows OS.

Requirements:

Install Pstools (by microsoft)

Install SSH Server on Windows 7 / 10

cd "%PROGRAMFILES%\OpenSSH"
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
powershell.exe -ExecutionPolicy Bypass -File FixHostFilePermissions.ps1
powershell.exe -ExecutionPolicy Bypass -File FixUserFilePermissions.ps1

Install SSH Client on Windows 7 / 10

Enable public keys without using password on client

cd "%PROGRAMFILES%\OpenSSH"
./ssh-keygen.exe

Enable public keys without using password on Server

./ssh-add.exe

Run graphical programs on remote computer with Windows using psexec.exe

Connect to the remote machine with ssh and run notepad.exe on the remote computer in the same user sessions opened.

cd "%PROGRAMFILES%\OpenSSH"
ssh.exe [remote_local_user]@[remote_ip] -i "C:\Users\\.ssh\id_rsa"
user@remote_ip> psexec.exe \\127.0.0.1 -d -i -s notepad.exe

fred151.net online since 2011