新建普通用户12345## 新建普通用户$ adduser ubuntu$ apt-get install sudo## 将用户加入sudo组$ usermod -a -G sudo ubuntu 为普通用户添加公钥123456789$ su ubuntu$ mkdir -p ~/.ssh$ cd ~/.ssh## 添加公钥$ touch authorized_keys$ cat '你的公钥字符串' >> authorized_keys$ chmod 600 authorized_keys$ chmod 700 ~/.ssh 设置 SSH,打开密钥登录12345678910$ vim /etc/ssh/sshd_configRSAAuthentication yesPubkeyAuthentication yes## 禁用root账号登录PermitRootLogin no## 禁用密码登录PasswordAuthentication no$ service sshd restart