Dondariadmin (トーク | 投稿記録) |
Dondariadmin (トーク | 投稿記録) (→背景) |
||
10行目: | 10行目: | ||
*長い。 | *長い。 | ||
*メンドクサイ。 | *メンドクサイ。 | ||
− | + | *履歴から引っ張り出して実行 | |
− | + | *間違って別なサーバーへアクセス | |
− | + | *別のサーバーにデプロイ | |
==サーバーごとに設定できる== | ==サーバーごとに設定できる== |
ssh -i ~/.ssh/honban_server_id_rsa user@honban_server.example.com
ユーザーごとの設定ファイル
~/.ssh/config
全体の設定ファイル
/etc/ssh/ssh_config
Host honban_server.example.com IdentityFile ~/.ssh/honban_server_id_rsa
ssh user@honban_server.example.com
Host honban_server.example.com Port 10022
Host honban_server.example.com ProxyCommand ssh fumidai_user@fumidai.example.com nc %h %p
HostName gateway.example.com LocalForward 13306 mysql.localnet:3306
ssh -L 13306:mysql.localnet:3306 gateway.example.com
telnet localhost 13306
man ssh_configTweet