0
0

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 パスワードレスの手順

Last updated at Posted at 2024-09-05
  1. クライアント側で以下の鍵を発行する操作をする
ssh-keygen -t ed25519 
Generating public/private ed25519 key pair. Enter file in which to save the key (/root/.ssh/id_ed25519): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_ed25519. Your public key has been saved in /root/.ssh/id_ed25519.pub. The key fingerprint is: SHA256:lfXUOABCdeFGHIJKPibkPe8lsXgXDX2WjcdFJy1234BY9FE root@rhel8.4-test The key's randomart image is: +--[ED25519 256]--+ |o ..+ . .o | |+. . X Eo.oo .| |.+ o . = Xoo ... | |o = + + =.+ | | o X = .S= | | o = + + . | | * . o | | = . . | | . | +----[SHA256]-----+ 
cd /root/.ssh cat id_ed25519.pub 

~中身の例~

ssh-ed25519 AAABD3NxfC1lZDI1ABCDEXXXXIIHJ6nanvGGpMnDEXwpDd9YgxYu7ikiQGgB/Zn99HFOs root@rhel8.4-test 
  1. ホストに登録
cd /root/.ssh 
  • id_ed25519.pub viで 上記で生成したの ~中身の例~ を追記する

この設定で以降のsshでパスワードを聞かれなくなる

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?