概要†SSHで踏み台サーバー経由でないとログインできないサーバーがあった場合に、コマンド一発で目的のサーバーへログインする方法です。 コマンド†$ ssh -o "ProxyCommand ssh -W %h:%p 踏み台にログインするユーザー@踏み台サーバー" -o "stricthostkeychecking=no" 踏み台サーバーからSSHするサーバー stricthostkeychecking=no で 鍵認証等を省略†# vi ~/.ssh/config 以下追記 Host 接続するホスト名 HostName 踏み台サーバーIPアドレス Port 22 User ユーザー IdentityFile ~/.ssh/id_rsa <--鍵 |