Putty;

      

1,  安装puttyputtygen

2,  打开puttygen,单击Generate 生成密钥,save privatekey 保存密钥。

   远程密钥登陆linux系统(putty、xshell)_linux


3,  复制公钥到Linux

   1,  mkdir /root/.ssh  //创建/root/.ssh 目录,这个目录默认是不存在的。

   2,  chmod 700 /root/.ssh  //更改这个目录的权限

   3,  vi /root/.ssh/authorized_keys //把公钥内容粘贴到文件vi /root/.ssh/authorized_keys

4,关闭seLinux

   1,  setenforce 0 暂时关闭,不需重启

   2,  vi /etc/selinux/config  SELIUNX=(enforcing)改为disabled 重启永久关闭

5,设置密钥登陆

   远程密钥登陆linux系统(putty、xshell)_linux_02


Xshell


1,  打开xshell 工具创建公有密钥和私有密钥

       远程密钥登陆linux系统(putty、xshell)_linux_03

     远程密钥登陆linux系统(putty、xshell)_linux_04



  远程密钥登陆linux系统(putty、xshell)_linux_05

远程密钥登陆linux系统(putty、xshell)_linux_06

2,  复制公钥到Linux

   1,  mkdir /root/.ssh  //创建/root/.ssh 目录,这个目录默认是不存在的。

   2,  chmod 700 /root/.ssh  //更改这个目录的权限

3vi/root/.ssh/authorized_keys  //把公钥内容粘贴到文件vi/root/.ssh/authorized_keys

3,关闭seLinux

1setenforce 0 暂时关闭,不需重启

2Vi /etc/selinux/config  SELIUNX=(enforcing)改为disabled 重启永久关闭

4,设置密钥登陆

 远程密钥登陆linux系统(putty、xshell)_linux_07