10
9

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のconfigファイルで複数の接続先を管理する

Last updated at Posted at 2012-12-26

~/.ssh/configを記述することで、複数の接続先に対する鍵を管理することができます。

~/.ssh/config
Host server1.example.com
	HostName		server1.example.com
	IdentityFile	~/.ssh/server1/id_rsa
	User			server1_user
Host server2.example.com
	HostName		server2.example.com
	IdentityFile	~/.ssh/server2/id_rsa
	User			server2_user

Host: 設定項目の識別子。ホスト名である必要はないが、ホスト名にすると重複しにくい。
HostName: 接続先のホスト名。
Identifile: 使用する秘密鍵。
User: 接続先ホストのユーザ名。

参考

~/.ssh/config で簡単に複数ホストへのSSH接続を管理する - すぱぶろ

10
9
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
10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?