LoginSignup
1
1

More than 5 years have passed since last update.

[備忘録]サーバーとSSH通信できるようにする

Last updated at Posted at 2019-04-10

サーバーとSSH通信できるようにする

公開鍵を作って、サーバーの設定ファイルに追記したらOK

  1. 公開鍵を作る
ssh-keygen -t ed25519 -N "" -C "makimatsun" -f ~/.ssh/makimatsun
  1. サーバーに接続する設定を追加
code ~/.ssh/config

で開いたConfigファイルに

Host makimatsun
    HostName pdb.maki-matsun.biz
    Port 3771
    User ubuntu
    IdentityFile ~/.ssh/makimatsun

を追記する

  1. 公開鍵は
cat ~/.ssh/windsscore.pub 

で取得できる

ssh-ed25519 AAAA~~~~~~~~~~~~~~~~VE8k/Gsgs makimatsun

みたいな感じ
サーバーのファイルに追記

  1. サーバーに接続するコマンドは
ssh makimatsun

ubuntuで繋がる

ls -la .ssh

で一覧がとれるからcatコマンドで確認可能

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