これも完全に自分用のメモ。
(家のルータの設定をミスって、SSHのポートを塞いでしまった時にもがいたメモ)
connect-proxyをいれる
sudo apt-get install connect-proxy
.ssh/config
Host localhost
Port 22
ProxyCommand connect-proxy -H xxx.xxx.xxx.xxx:pppp %h 22
xxx.xxx.xxx.xxx:pppp
・・・HTTPプロキシ鯖
これで
yi01@asama:~$ ssh localhost
yi01@localhost's password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Sat Apr 9 22:17:56 2016 from localhost
yi01@hayate:~$
のように、HTTP Proxyが立っている鯖にSSHで入れる。
通常、localhostにSSH接続することはまずないので、.ssh/configでつぶしちゃっても問題ないかなと。
というかそもそも
SSHのポートを開けておくのとHTTP Proxyのポートを開けておくのでは、前者のほうが安全なことが多いので、大抵の場合こんな技は使えないのだけども・・・。