7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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
7
5
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
7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?