Saturday, February 26, 2022

[SOLVED] SSH gateway throught linux jumphost

Issue

From a host with Windows server 2019, you need to connect via http & rdp to hosts on another network. Is it possible to establish a connection using standard Windows tools through an ssh gateway from which there is access to the destination network? Not to one host, but to all hosts on the subnet.


Solution

Batch file starts then user logon:

@echo off
Reg Add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d socks=127.0.0.1:8888 /f
Reg Add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 00000001 /f
ssh -D 8888 %username%@ip.ssh.tun.nel


Answered By - Marina Vinograd
Answer Checked By - Senaida (WPSolving Volunteer)