centos6.5 ssh 连接及ftp服务建立~~~

来源:互联网 发布:ubuntu 设置默认路径 编辑:程序博客网 时间:2024/04/25 08:53

首先,下载oppenssh-server

sudo yum install openssh-server

查看进程
 ps -e |grep ssh

//重启服务
/etc/init.d/sshd restart

 //开机启动

chkconfig sshd on    

在防火墙里面加入规则:

/etc/sysconfig/iptables 

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

//重启IPTABLES 服务

service iptables restart


这样应该可以用telnet访问了。


ftp:

//下载ftp服务

yum -y install vsftpd

//设置开机启动vsftpd ftp服务
chkconfig vsftpd on
//重新启动vsftpd服务
service vsftpd restart
//管理vsftpd相关命令:

停止vsftpd:  service vsftpd stop
重启vsftpd:  service vsftpd restart


//配置vsftpd服务器
vi /etc/vsftpd/vsftpd.conf


#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list

..................................

//在防火墙里面加入规则:

vim/etc/sysconfig/iptables 

-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

//重启IPtable的服务

service iptables restart

//重新启动vsftpd服务

service vsftpd restart 



0 0
原创粉丝点击