Ansible ssh-keygen 설정하기
ansible@ansible_server ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/ansible/.ssh/id_rsa): Created directory '/home/ansible/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/ansible/.ssh/id_rsa. Your public key has been saved in /home/ansible/.ssh/id_rsa.pub. The key fingerprint is: SHA256:Fi1xN3ibH+YvjCtaJZwTy0hvFLzkbdLnZMFMieR/Ipc ansible@ansible_server The key's randomart image is: +---[RSA 2048]----+ | ..oo+=.. | | +++o.= | | +o+=.o . | | . O++*.*. | | S XooOE..| | . . + o+o | | . o . | | .. . o .| | .. ... . | +----[SHA256]-----+ [ansible@ansible_server ~]$ cd .ssh [ansible@ansible_server .ssh]$ cp id_rsa.pub authorized_keys [ansible@ansible_server .ssh]$ ssh-copy-id ansible@192.168.1.27 /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/ansible/.ssh/id_rsa.pub" The authenticity of host 'ansible_node01 (192.168.1.27)' can't be established. ECDSA key fingerprint is SHA256:RZHkt0SXDjTuzinR+3jQxJIXOEdwvjGEripN5g3dGFg. ECDSA key fingerprint is MD5:cf:f1:90:26:df:c4:e3:62:06:42:00:39:55:2d:aa:f3. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys ansible@192.168.1.27's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'ansible@192.168.1.27'" and check to make sure that only the key(s) you wanted were added |
'Ansible' 카테고리의 다른 글
[Ansible] 실습 - java version 확인 (에러 처리 포함) (0) | 2022.03.19 |
---|---|
[Ansible] 실습 - openssl version 조사 (0) | 2022.03.19 |
[Ansible] 기본 환경 설정 (0) | 2022.03.19 |
[Ansible] 설치 (0) | 2022.03.19 |
[Ansible] 설치 사전작업 (0) | 2022.03.19 |