SSHでProxyを経由するときの話。
CentOSでできるのにAlpine(コンテナ)でできなくてしばらくはまったのでメモ
nc -h
で見るとわかるがオプションが違う
CentOSの場合
yum install nc nmap
ssh -o 'ProxyCommand=nc --proxy-type http --proxy <proxy.server:8080> %h %p' <user>@<host>
Alpineの場合
apk add --update --no-cache netcat-openbsd openssh-client
ssh -o 'ProxyCommand=nc -X connect -x <proxy.server:8080> %h %p' <user>@<host>
以上。