關於安全的日常操作
安全對於我們平時工作中是一件很重要的事情。
因此在日常中我們應該儘可能做好並且規避一些不安全的操作。
密碼使用密碼管理器
比如說使用 1Password、keychain 這些密碼工作。iOS 的 keychain 在 iOS 12 的時候也可以在 App 上直接調取 keychain 中的賬號密碼,非常方便。keychain 本身就可以生成隨機密碼。
ssh 使用不同的祕鑰
比如公司的 Git 倉庫與 GitHub 分別使用不同的 ssh 祕鑰
╰─$ ls ~/.ssh configid_rsa.githubid_rsa.example
其中 config 為祕鑰的配置項,ssh 到不同的伺服器時可自動切換為不同的祕鑰。
╰─$ cat config Host * ControlPersist yes ControlMaster auto ControlPath ~/.ssh/master-%r@%h:%p Host *.example.com IdentityFile ~/.ssh/id_rsa.example User [email protected] Host *github.com IdentityFile ~/.ssh/id_rsa.github User [email protected]
引用: