标签:linux
一、putty
1.putty下载安装
官网:https://www.chiark.greenend.org
下载地址:https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
最好下载putty的zip包,包含了常用的小组件和工具
putty.zip (a .ZIP archive of all the above)
https://the.earth.li/~sgtatham/putty/latest/w64/putty.zip
32位和64位都可以使用,与操作系统不冲突
暂时需要用到的只是putty.exe一个程序
2.putty的常用设置
a.在Appearance--Font settings中设置字体、大小
b.在Translation--Remote character set中设置字符的编码方式(常用UTF-8)
c.在Window中设置 Lines of scrollback来控制一个session中可以查看的行数(建议值2000)
二、putty秘钥验证
使用 puttygen生成公钥和私钥,将私钥保存在本地,公钥保存在linux系统(即server上),公钥和私钥正确配对,就可以正常连接。
1、打开puttygen,点击Generate创建密钥对如图:
生成期间,需要多次晃动鼠标来加快生成速度;生成完成之后如下:
2、按如下步骤在server上创建公钥文件:
[root@localhost ~]# mkdir /root/.ssh
[root@localhost ~]# chmod 700 !$
chmod 700 /root/.ssh
[root@localhost ~]# vim /root/.ssh/authorized_keys #粘贴进puttygen中的公钥内容
chmod 600 /root/.ssh/authorized_keys //更改文件权限
3、在putty上加载私钥
再次链接server,就需要输入第一步设置的私钥密码:
此时,密钥认证完成!
注意:
-----------------------------------------
防火墙有两个:selinux和netfilter
setenforce 0 //暂时关闭防火墙
vi /etc/selinux/config //进入该目录进行更改配置文件
把 SELINUX=enforcing
改成 SELINUX=disabled
iptables -F //暂时清除防火墙,重启后会恢复
service iptables save //将清除防火墙规则保存到 /etc/sysconfig/iptables
----------------------------------------------------------------------
三、Xshell
个人版免费试用,可从官网下载,也可以直接从百度下载
要实现和putty一样的功能:鼠标左键选中复制,邮件单击粘贴,则需要按如下设置:
打开Xshell,工具--选项--- 如下图
分别设置鼠标右键功能为Paste the clipboard contents,并勾选下面的红框选项即可。
Xshell密钥验证,后续补录。
标签:linux
原文地址:http://xiexiaoying.blog.51cto.com/3996899/1973985