0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SSH管理のConfig設定のメモ

Last updated at Posted at 2019-06-24

SSH管理のConfig設定のメモ

自分用にSSH管理のConfig設定のメモ

Configの場所

基本はユーザホーム直下の .ssh/config というファイル

Mac

~/.ssh/config

Windows

%HOME%\.ssh\config

SSHコマンド

ssh {接続先のユーザ名}@{IPまたは名前解決できるドメイン} -i {鍵ファイルのパス}

$ ssh root@dev.hogehoge.com -i ~/.ssh/hogehoge.com/dev-root.pem

文法

Host {自由につける名前}
    HostName {IPまたは名前解決できるドメイン}
    User {接続先のユーザ名}
    IdentityFile {鍵ファイルのパス}
    Port {22ポート以外だったらこれで指定}
Host dev-hogehoge
    HostName dev-hogehoge
    User root
    IdentityFile ~/.ssh/hogehoge.com/dev-root.pem
使用時
$ ssh dev-hogehoge
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?