알고보면 쓸데있는 신비한 잡학IT노트

ssh keygen 생성

남차장 2020. 12. 31. 11:44

간단하다 ssh-keygen -> 엔터 세번 -> 끝


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>
Enter same passphrase again:  <ENTER>
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.

공개키 출력은

cat /root/.ssh/id_rsa.pub 

또는

cat ~/.ssh/id_rsa.pub

 

출력된 공개키는 접속을 원하는 서버에 복붙!

복붙위치

~/.ssh/authorized_keys