- Đầu tiên bạn gõ lệnh để tạo file id_dsa.pub chứng thực
ssh-keygen -t dsa -b 1024
-> enter
-> enter
-> enter
- Sau khi tạo xong file được lưu trong /root./ssh/id_dsa.pub
- Bạn copy file id_dsa.pub và đổi tên thành authorized_keys và lưu trong thư mục /root/.ssh/
- Gán quyền cho file
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh/