Putty远程连接Linux

1.查看linux的IP,,ifconfig

2.打开PUTTY 在hostname 输入192.168.15.132 在Saved Sessions 随便输入注释名,如martin001 ,然后选择load

出现 login as:黑色窗口,,输入用户名root 回车再输入root密码

Xshell远程连接Linux

1.ifconfig 查看linux IP 2.安装好Xshell,并打开: 选择新建会话 再点连接

Putty密钥连接Linux

在开始菜单--Putty---puttygen---Generate

生成私钥和公钥命令并保存到文档中。

返回LINUX中在/root目录下新建.ssh目录并修改其权限,创建authorized_keys文件,把刚才保存的私钥内容复制进来并保存,再关闭防火墙。 命令:mkdir /root/.ssh chmod 700 /root/.ssh vi /root/.ssh/authorized_keys setenforce 0

打开Putty软件,设置如下:

					![](http://i2.51cto.com/images/blog/201712/13/d9bd10dbd6bba538dad91f87741d3b00.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)

![](http://i2.51cto.com/images/blog/201712/13/f272e4c02ea184b01fb79be7ae181066.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)

Xshell密钥连接Linux

返回LINUX中在/root目录下新建.ssh目录并修改其权限,创建authorized_keys文件,把刚才保存的私钥内容复制进来并保存,再关闭防火墙。 命令:mkdir /root/.ssh chmod 700 /root/.ssh vi /root/.ssh/authorized_keys setenforce 0

打开XHELL软件,设置如下:

![](http://i2.51cto.com/images/blog/201712/14/2c63c73e72d9c3e5320203c961f16bac.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)
	
	![](http://i2.51cto.com/images/blog/201712/14/6d9d2d8f87cde3859cb8f7716e30409d.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)
	
	![](http://i2.51cto.com/images/blog/201712/14/f66e48e86a15a00e12cda10da3ba0471.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)
	
	![](http://i2.51cto.com/images/blog/201712/14/dcd2e28c8fbacc79cd6c26ae41f582bf.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)
	
	![](http://i2.51cto.com/images/blog/201712/14/8e0bc0333377dcdcd4752afc72eaa5c5.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)

![](http://i2.51cto.com/images/blog/201712/14/648c0f90e56296e752d82d632db26cab.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)

![](http://i2.51cto.com/images/blog/201712/14/d753f2047c38e2a9415e95e780615e68.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)