工具:xshell

1.在xshell上生成public key

  

 

 

 

 

 

  

2.在远程服务器上新建用户,加秘钥,以用户:alice  为例

  (1)登录服务器

  (2)useradd alice

  (3)cd /home/alice/

  (4)mkdir .ssh

  (5)cd .ssh

  (6)vim authorized_keys  ------添加key

  

  (7)chown alice:alice authorized_keys      ----授权

   

基本的完成了

3.在xshell上面,用相应的用户和秘钥登录,即可