3
3

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でログインする際にホスト名を変える

Posted at

SSHでログインする際にssh xxx@xxx.xxx.xxx.xxx と入力するのは面倒なので、ssh example.com に変更する。

.ssh/config 作成

Host example.com
   HostName xxx.xxx.xxx.xxx ex) 192.168.56.100
   User xxx ex) n2xnot
   Port 2222
   IdentityFile ~/.ssh/id_rsa
   ServerAliveInterval 30 接続切れを防ぐため30秒に1回サーバーに通信する
3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?