LoginSignup
5
4

More than 5 years have passed since last update.

SSH接続のコマンドを省略

Last updated at Posted at 2018-03-24

サーバにSSH接続する時に毎回下記のコマンドを打つのが面倒くさい。

$ ssh -i id_rsa sampleuser@xxx.xxx.xxx.xxx

~/.ssh/configファイルに設定を書く。

Host hoge
  User sampleuser
  Port 22
  HostName xxx.xxx.xxx.xxx
  IdentityFile ~/.ssh/id_rsa

これでシンプルなコマンドで接続できるようになる。

$ ssh hoge
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4