DRYな備忘録

Don't Repeat Yourself.

ssh

sshトンネリング(ポートフォワード)とか多段ポートフォワード

ssh

localhostの9999番ポートを、リモートホストmyremotehost.comの7777番に、myproxyを使ってポートフォワードしたい。 ssh -L 9999:myremotehost.com:7777 myproxy で、myremotehost.com:7777で動いてる何かし(アプリケーションや、MySQLなどのデーモン)へア…

踏み台サーバを使ったssh

ssh

~/.ssh/config など Host fumidai HostName 1.1.1.1 User otiai10 ForwardAgent yes Host honmei HostName 1.1.1.2 User otiai20 ProxyCommand ssh -W %h:%p fumidai IdentityFile ~/.ssh/honmei.pem 踏み台サーバ(fumidai) user: otiai10 で入る 本命サー…