linux

linux 筆記


複製 ssh key 時遇到權限問題先檢查以下設定有沒有問題

  • SSH Key 權限
    • .ssh 資料夾 700 (drwx------)
    • public key (id_rsa.pub) 644 (-rw-r--r--)
    • authorized_keys 644 (-rw-r--r--)
    • private key (id_rsa) 600 (-rw-------)

複製 public key 到 server

  1. ssh-copy-id -i <public key file> username@host

Author: Whitey
Link: https://www.whitey.me/2022/01/05/linux/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.