1. ssh-keygen 실행 예제
$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/leesangy/.ssh/id_rsa): Created directory '/home/leesangy/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/leesangy/.ssh/id_rsa. Your public key has been saved in /home/leesangy/.ssh/id_rsa.pub. The key fingerprint is: --- 생략 --- |
2. ssh-copy-id 실행 예제
$ ssh-copy-id localhost /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/leesangy/.ssh/id_rsa.pub" /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 leesangy@localhost's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'localhost'" and check to make sure that only the key(s) you wanted were added. |
3. 생성 확인
$ ls -l ~/.ssh total 16 -rw------- 1 leesangy xxxx 398 Jul 23 00:34 authorized_keys -rw------- 1 leesangy xxxx 1675 Jul 23 00:31 id_rsa -rw-r--r-- 1 leesangy xxxx 398 Jul 23 00:31 id_rsa.pub -rw-r--r-- 1 leesangy xxxx 171 Jul 23 00:33 known_hosts |
4. 기타
$ cat .ssh/config StrictHostKeyChecking no |
'Applications > LINUX' 카테고리의 다른 글
[보안팁] root 계정 원격 접속 제한 (0) | 2023.03.06 |
---|---|
[NVIDIA] HPC_SDK "libatomic.so.1" 오류 (0) | 2022.11.25 |
RHEL 8 tigervnc-server 설치 (0) | 2022.03.08 |
NVIDIA GPU DRIVER 확인 (0) | 2022.03.08 |
HPC 시스템에서 ABRT Daemon 관련 이슈 (0) | 2021.08.10 |