You are looking for ssh-copy-id
. All this command does is create .ssh
and .ssh/authorized_keys
and set their permissions appropriately if they don't exist. Then it appends your public key to the end of .ssh/authorized_keys
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…