How to generate a ssh key on Ubuntu?

peng·2023년 11월 13일

Client side

# generate key files (public key & private key)
ssh-keygen -t rsa -m pem

# (optional) rename the private key file
mv id_rsa id_rsa.pem

# read the public key file
cat id_rsa.pub

Server side

# append the public key to the authorized_keys file
vim ~/.ssh/authorized_keys

0개의 댓글