SSH
OpenSSH
.ssh/config
個人用の ssh の設定。
ホスト名をエイリアス的に使用する。
$ cat ~/.ssh/config
Host remote
Hostname remote.hogehoge.co.jp User user IdentityFile /home/user/.ssh/id_rsa
以下のように、remote で remote.hogehoge.co.jp に接続する。
luser@local $ ssh server1
-> ssh -l user -i /home/user/.ssh/id_rsa server1.hogehoge.co.jp と同等
サーバを経由させる。
local -> remote1 -> remote2 のように接続させる。
Host remote2
ProxyCommand ssh -W %h:%p remote1 2> /dev/null
- 最終更新:2017-02-05 12:09:25