Skip to content

Instantly share code, notes, and snippets.

@abakum
Created December 28, 2024 09:17
Show Gist options
  • Save abakum/5c5861dc3a1bb769560b264d58413b39 to your computer and use it in GitHub Desktop.
Save abakum/5c5861dc3a1bb769560b264d58413b39 to your computer and use it in GitHub Desktop.
ProxyCommand plink in ssh config for Socks5 proxy
#Иногда простые для юниксоидов вещи ставят виндовсоидов в тупик:
#Простое вроде дело при наличии netcat или connect подключится по ssh через Socks5 прокси.
#А вот на Виндовс проще поставить PuTTY.
Host 12_
User koka
HostName 192.168.0.12
UserKnownHostsFile ~/.ssh/%h
#For Windows instead of
#ProxyCommand connect -S 127.0.0.1:1080 %h %p
#or
#ProxyCommand nc -x 127.0.0.1:1080 %h %p
#use plink:
#reg add "HKCU\SOFTWARE\SimonTatham\PuTTY\Sessions\D1080" /v ProxyHost /d 127.0.0.1 /f
#reg add "HKCU\SOFTWARE\SimonTatham\PuTTY\Sessions\D1080" /v ProxyMethod /d 2 /f /t REG_DWORD
#reg add "HKCU\SOFTWARE\SimonTatham\PuTTY\Sessions\D1080" /v ProxyPort /d 1080 /f /t REG_DWORD
ProxyCommand plink -load D1080 -raw %h -P %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment