最終更新:2018-05-25 (金) 22:27:47 (2155d)
Linux/~/.ssh/config
Host エイリアス名 Hostname ホスト名 User ユーザ名
と書いておくと
ssh エイリアス名
でログインできる
鍵ファイル
- IdentityFile?
- 使用する鍵を列挙しておけば、鍵ファイルを勝手に探してくれる
IdentityFile ~/.ssh/id_rsa IdentityFile ~/.ssh/id_rsa.hoge IdentityFile ~/.ssh/id_rsa.foo
メモ
Host hoge-GitHub HostName github.com User hoge Port 1234 PreferredAuthentications publickey IdentityFile /Users/tokkyo/.ssh/hoge-GitHub UseKeychain yes AddKeysToAgent yes
メモ
- Mac OS Xだとsshするだけでconfigを読んでくれた
man
man ssh_config
コマンド
例
Host hoge Hostname example.com User test IdentityFile ~/.ssh/id_rsa.hoge