1.参考网址:
- linux关闭防火墙以及开启远程连接参考:http://blog.csdn.net/u013008179/article/details/50901228
2.linux关闭防火墙
1.检查防火墙状态:service iptables status 若运行中,如返回信息如下图所示
![1096351-1a547d6e4097dd29.png](https://i-blog.csdnimg.cn/blog_migrate/e96d1ca57019de3d965afcde790fda07.webp?x-image-process=image/format,png)
20160315234322264.png
2.临时关闭防火墙 service iptables stop(保证不重启能使用) 然后永久关闭防火墙:chkconfig iptables off 若已关闭,如返回信息如下图所示: 则跳过此步操作。
![1096351-fbce8748cab4b54a.png](https://i-blog.csdnimg.cn/blog_migrate/18659952902cf043a4f0de538d52f69d.webp?x-image-process=image/format,png)
20160315234602877.png
3.关闭SELinux:vi /etc/selinux/config 在打开的配置文件中修改数据为:SELINUX=disabled 退出编辑状态:按“ESC“,输入:wq 敲回车编辑状态。 在终端中输入命令: setenforce 0
![1096351-a3b4fa7671f5a7ee.jpg](https://i-blog.csdnimg.cn/blog_migrate/f46703770ca5f98ffaf1a7308fa765f4.webp?x-image-process=image/format,png)
20160315234919318.jpg
4.配置SSH:vi /etc/ssh/sshd_config 在打开配置文件中修改参数:GSSAPIAuthentication 为 no UseDNS 为 no 退出编辑状态:按“ESC“,输入:wq 敲回车退出编辑状态。
5.在终端中输入命令:service sshd restart 然后 chkconfig sshd on 重启service network restart
![1096351-107389ac6a21e3ee.png](https://i-blog.csdnimg.cn/blog_migrate/372841d6a420cb6ae20c2cad3f403e81.webp?x-image-process=image/format,png)
20160315235333413.png
6.查看本机的IP地址 ipconfig
3.Xshell和xftp 的配置使用
1.此时可以用SSH远程终端进行远程连接配置(这里以Xshell 4为例) 首先修改编码
![1096351-675890d449a3d387](https://i-blog.csdnimg.cn/blog_migrate/edd83cfa302a45ca6f99faca9afa8038.webp?x-image-process=image/format,png)
这里写图片描述
2.xftp的编码格式的修改
![1096351-7b2050bcff93d098](https://i-blog.csdnimg.cn/blog_migrate/db58ba0b77b19589e20658a37f7252cc.webp?x-image-process=image/format,png)
这里写图片描述
3.linux常用命令
- cd /文件夹 进入文件夹
- mkdir 文件夹名 创建文件夹
- chmod 755 文件夹名 为文件夹赋权限
- netstat -anlp | grep 22 查看端口是否开放
- service network restart 重启网络服务