https://docs.microsoft.com/ko-kr/azure/virtual-machines/linux/create-ssh-keys-detailed
명령어
ssh-keygen -t rsa -b 2048
작업내용
SanseLG@SanseLG MINGW64 ~ $ ssh-keygen -t rsa -b 2048 Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/SanseLG/.ssh/id_rsa): /c/Users/SanseLG/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/SanseLG/.ssh/id_rsa. Your public key has been saved in /c/Users/SanseLG/.ssh/id_rsa.pub. The key fingerprint is: SHA256:/R71nn2Qwyuck3p9zXIeGCrMOUbJvEotHIMBkSRqhyI SanseLG@SanseLG The key's randomart image is: +---[RSA 2048]----+ | ..+o | |. o.. | |Eo . . | |+ . o o.. | | . oS=. o.. | | . B o...B. | | + X oo= *o| | . + o.B.+.X| | . .o.o *=| +----[SHA256]-----+ SanseLG@SanseLG MINGW64 ~/.ssh $ cat id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNEpqXlhEHUKidf4LD6RbpczTuBLEt5nYVQfgEaIKbio9+TSd9JUKSR1q4u5znKyHSTbrj7YTcRAxs7dasqPu1Wdw1S/ebTQGWcGiGAb67JRKf9NXbuLVaOFjVV01gKDNCQp2tKI1Q2Wyqcg24ajyRUPg1/cFP3Rd/e+Nrn27cUUzx/78qovyE3z6ABapVL8/lBESeqdZNMOQkMaKCsjwz5ckIx5lvnnXWqeoJZE9FyLoTsJLDRvLPiVvTVR0P/BCrDGI/adSbev/zozibz9hJPhEMKtd8G4JC5MV/Xo05U1+qpR8dp9vRaCoAEBecoUEyk8BY1wvM1TtqmhzfZEMv SanseLG@SanseLG
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNEpqXlhEHUKidf4LD6RbpczTuBLEt5nYVQfgEaIKbio9+TSd9JUKSR1q4u5znKyHSTbrj7YTcRAxs7dasqPu1Wdw1S/ebTQGWcGiGAb67JRKf9NXbuLVaOFjVV01gKDNCQp2tKI1Q2Wyqcg24ajyRUPg1/cFP3Rd/e+Nrn27cUUzx/78qovyE3z6ABapVL8/lBESeqdZNMOQkMaKCsjwz5ckIx5lvnnXWqeoJZE9FyLoTsJLDRvLPiVvTVR0P/BCrDGI/adSbev/zozibz9hJPhEMKtd8G4JC5MV/Xo05U1+qpR8dp9vRaCoAEBecoUEyk8BY1wvM1TtqmhzfZEMv SanseLG@SanseLG
.ssh 폴더 및 하위 파일들의 올바른 퍼미션은 다음과 같습니다. 퍼미션이 잘못된 경우 사용하지 못하게 됩니다.
chmod 700 ~/.ssh chmod 600 ~/.ssh/id_rsa chmod 644 ~/.ssh/id_rsa.pub chmod 644 ~/.ssh/authorized_keys chmod 644 ~/.ssh/known_hosts
0 Comments