Linux ssh,ftp Service Configuration

Source: Internet
Author: User

Centos-6.4-x86_64-minimal

0. Network card Configuration

Reference: What about Linux system \centos without NIC eth0 configuration file? -Http://jingyan.baidu.com/article/84b4f565cb7afa60f6da32d4.html

Temporary configuration: Ifconfig device name IP address
# ifconfig Eth0 192.168.1.11
(Effective immediately after Setup, do not restart the NIC service, otherwise invalid)

Permanent Solution:
1) Copy/etc/sysconfig/network-scripts/ifcfg-lo, change to Ifcfg-eth0
# Cp/etc/sysconfig/network-scripts/ifcfg-lo/etc/sysconfig/network-scripts/ifcfg-eth0
2) Modify configuration, reference: Linux ifcfg-eth0 configuration parameter Description-http://blog.chinaunix.net/uid-9967220-id-1995610.html
device= Physical Device name (eth0)
Ipaddr=ip Address (192.168.1.11)
netmask= Mask Value (255.255.255.0)
network= Network Address (192.168.1.0)
Broadcast= broadcast Address (192.168.1.255) (optional)
gateway= Gateway Address (192.168.1.1) (optional)
Onboot=[yes|no] (whether the device is activated at boot time)
Userctl=[yes|no] (whether the device can be controlled by a non-root user) (optional)
BOOTPROTO=[NONE|STATIC|BOOTP|DHCP] (Do not use protocol at boot | static Assignment | BOOTP protocol | DHCP protocol)
HWADDR = your MAC address (optional)
2) Restart Network Service
# Service Network Restart
(During the restart, if the MAC address is incorrect, you can use Ifconfig to view the MAC address or simply comment out the MAC address)
3) test whether the Internet is available, such as:
# ping Www.baidu.com
If the couldn ' t resolve host error occurs, then there is a DNS server error, the workaround:
Modify/etc/resolv.conf
Added: NameServer 8.8.8.8

1. Configure and open SSH service

Reference: How do I configure SSH under the Linux system? How do I turn on ssh? -Http://jingyan.baidu.com/article/08b6a591f0fafc14a9092275.html

1) Check to see if SSH is installed:
# which SSH
If it is not installed, execute:
# yum Install SSH

2) Modify the SSH service configuration file/etc/ssh/sshd.config, do not modify the line, the default 22 port
(Note Firewall issues)

3) Start the SSH service
# service sshd Start

2, configure and open the FTP service (currently not successful, mainly remote connection FTP timeout, is estimated to be a firewall cause)

Reference: How to open FTP service under Linux-http://blog.csdn.net/ft1512975/article/details/6620227

1) See if FTP is installed
# which VSFTPD
If it is not installed, execute:
# yum Install vsftpd

2) View FTP service status
# Service VSFTPD Status

3) Start the FTP server
# service VSFTPD Start

4) Check if the service has started
# Netstat-an | grep 21

5) If you need to start the root user ftp permissions, you need to comment out the root of the following two files:
/etc/vsftpd/ftpusers
/etc/vsftpd/user_list

6) automatic Start VSFTPD service
# Chkconfig VSFTPD on
All boot levels automatically start the VSFTPD service
Reference: Three ways to vsftp boot from Redhat-http://blog.sina.com.cn/s/blog_73f7c7a40100qufm.html

7) If there is an error vsftpd oops:cannot change Directory
# Sestatus-b | grep FTP
View the status of SELinux FTP
Set Setsebool-p Ftpd_disable_trans on or setsebool-p ftp_home_dir on (one can)
# Service VSFTPD Restart
Restarting the FTP service
Reference: Rhel vsftpd Local Users cannot log in, "Cannot change directory" when connected-http://foolraty.iteye.com/blog/1487184

8) If the computer can connect FTP, remote can not connect FTP, it may be because the firewall shut down the 21 port
Modified:/etc/sysconfig/iptables
Added:-A input-m State--state new-m tcp-p TCP--dport 21-j ACCEPT
Reference: http://blog.163.com/dk_linux/blog/static/203226166201261323349658/

Linux ssh,ftp Service Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.