首页
学习
活动
专区
圈层
工具
发布
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Ubuntu 配置 SSH 秘钥登录

    为了确保安全,一般情况下,我们在自己的机器上不会选择使用密码登录,必要时还会关闭 root 账户的 ssh 登录功能 生成 SSH 秘钥对 先使用 ssh-keygen 创建一个密钥对 如果对安全性有更高的追求...,推荐使用椭圆曲线算法来生成密钥对 ubuntu@ubuntu:~$ ssh-keygen Generating public/private rsa key pair....Enter file in which to save the key (/home/ubuntu/.ssh/id_rsa): Created directory '/home/ubuntu/.ssh...预期应生成两个文件 id_rsa 和 id_rsa.pub 部署 SSH 公钥 将公钥添加进 ~/.ssh/authorized_keys 文件中 ubuntu@ubuntu:~/.ssh$ cat ....no 禁用 ROOT 密码登录适用于一些为高级账号使用统一秘钥,而低级账号使用其他验证方式的场景,这样可以更加便于管理服务器 最好待测试成功使用秘钥登录后再禁用密码登录 最后重启 SSH 服务 sudo

    3.5K10
    领券