centos:ssh_tunnel
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
centos:ssh_tunnel [2015/08/25 06:39] – [nc コマンド] clownclown | centos:ssh_tunnel [2025/02/16 13:53] (現在) – 外部編集 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
====== SSHでトンネル経由でログイン ====== | ====== SSHでトンネル経由でログイン ====== | ||
+ | |||
+ | **多段ssh** のはなし。 | ||
===== -t オプション ===== | ===== -t オプション ===== | ||
行 115: | 行 117: | ||
</ | </ | ||
+ | ===== 特定の踏み台サーバを経由するものを一括指定 ===== | ||
+ | < | ||
+ | Host login | ||
+ | User www | ||
+ | HostName | ||
+ | Port 2222 | ||
+ | IdentityFile ~/ | ||
+ | |||
+ | Host web01 | ||
+ | HostName | ||
+ | |||
+ | Host web02 | ||
+ | HostName | ||
+ | |||
+ | Host web* | ||
+ | User www | ||
+ | IdentityFile ~/ | ||
+ | ProxyCommand ssh login -W %h:%p | ||
+ | </ | ||
+ | 「web*」は正規表現で「web01/ | ||
+ | < | ||
+ | ssh web02 | ||
+ | </ | ||
+ | |||
+ | ===== もっと多段 ===== | ||
+ | |||
+ | fumidai01 -> fumidai02 -> server | ||
+ | < | ||
+ | Host fumidai01 | ||
+ | User www | ||
+ | HostName | ||
+ | |||
+ | Host fumidai02 | ||
+ | User www | ||
+ | HostName | ||
+ | ProxyCommand ssh fumidai01 -W %h:%p | ||
+ | |||
+ | Host server | ||
+ | User www | ||
+ | HostName | ||
+ | ProxyCommand ssh fumidai02 -W %h:%p | ||
+ | </ | ||
+ | < | ||
+ | ssh server | ||
+ | </ |
centos/ssh_tunnel.1440484765.txt.gz · 最終更新: 2025/02/16 13:50 (外部編集)