"리눅스 ssh-keygen"의 두 판 사이의 차이

43번째 줄: 43번째 줄:


==실행예시: -f 옵션==
==실행예시: -f 옵션==
{{참고|ssh-keygen -f}}
<source lang='console'>
<source lang='console'>
root@zetawiki:~# ssh-keygen -f my-ssh-key.pem
root@zetawiki:~# ssh-keygen -f my-ssh-key.pem

2017년 2월 9일 (목) 14:49 판

리눅스 RSA 2048 공개키, 개인키 생성
리눅스 ssh-keygen
/usr/bin/ssh-keygen

1 실행예시: 기본 실행

  • 아무 옵션 없이 실행하면 대화식 진행 ( 기본 위치: ~/.ssh/id_rsa )
[root@zetawiki ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter
Enter passphrase (empty for no passphrase): 
Enter same passphrase again:
→ 암호 2번 입력
SSH 자동로그인을 하려면 암호를 입력하지 않고 Enter 2번
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
20:e9:b0:5b:5a:2b:ad:e8:4d:e4:b3:a0:32:49:2d:97 evan
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|     .           |
|  . o .          |
|   + . .         |
|  o.=   S        |
| ooE .           |
|.o*+o            |
|=.+oo            |
|=o.o             |
+-----------------+
  • 다음과 같이 개인키(id_rsa), 공개키(id_rsa.pub) 파일이 생성되었음
[root@zetawiki ~]# ll ~/.ssh/id_rsa*
-rw------- 1 root root 1743 Sep  4 14:28 /root/.ssh/id_rsa
-rw-r--r-- 1 root root  390 Sep  4 14:28 /root/.ssh/id_rsa.pub

2 실행예시: -f 옵션

root@zetawiki:~# ssh-keygen -f my-ssh-key.pem
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in my-ssh-key.pem.
Your public key has been saved in my-ssh-key.pem.pub.
The key fingerprint is:
ac:5b:fb:32:75:2c:43:25:2f:0e:a7:8e:33:a3:88:42 root@zetawiki
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|          . .    |
|           +     |
|       .. + .    |
|        S* o     |
| E     .. = o    |
|.     .o.. +     |
|.. .  =o+.       |
|o . ...+.+.      |
+-----------------+
root@zetawiki:~# ll my-ssh-key.pem*
-rw------- 1 root root 1679 Feb  9 14:33 my-ssh-key.pem
-rw-r--r-- 1 root root  395 Feb  9 14:33 my-ssh-key.pem.pub

3 같이 보기

4 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}