Configure ssh, telnet, and ftp services in redhat

Source: Internet
Author: User
Tags get ip ssh secure shell ssh server

In redhat, ssh, telnet, and ftp services, the Linux Command Line permanently modifies the IP address, gateway, and DNS. 1. Modify the IP address www.2cto.com. First, check the number and name of your host Nic. The related information is under/etc/sysconfig/network-scripts. As you can see, I have two NICs. The first is an Ethernet physical NIC with no. 0. If you have multiple NICs, the numbers are 0, 1, 2, and 3 ...; the second ENI is a back-to-ring Eni, which generally does not need to be set. Use vim to edit the NIC you need to set the IP address, here I can only modify the ifcfg-eth0, see the figure, not much explanation, the previous status is set to DHCP when writing. Www.2cto.com vim/etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE = eth0 # Nic name BOOTPROTO = static # Get ip method (static/dhcp/bootp), do not explain HWADDR = 00: 0C: 29: B5: B2: 69 # MAC address IPADDR = 12.168.1.5 # IP address NETMASK = 255.255.255.0 # subnet mask NETWORK = 192.168.1.0 # NETWORK address BROADCAST = 192.168.0.255 # BROADCAST address NBOOT = yes # start device 2. modify the GATEWAY vim/etc/sysconfig/network and add the GATEWAY Information GATEWAY = 192.168.1.1 3. modify DNS vim/etc/resolv. add DNS information in conf to nameserver 192.1. 68.1.1 4. reload the network configuration/etc/init. d/network restart RedHat 9 Linux enable SSH service command start: service sshd start installation process: 1. log on to the system as a root user (you cannot install the system without logging on to the system or having sufficient permissions. This is not a nonsense. check whether the SSH server software package has been installed during system installation: rpm-qa | grep openssh. If openssh-server-* is displayed, it indicates that it has been installed, directly start the sshd service (service sshd start ). (the content of * is the version of this package, which is usually 3.5p1-6.) If no display is displayed or the display does not contain openssh-server-*, the SSH server software package is not installed, go to step 3. find the redhat 9.0 installation disc, attach it to the optical drive, and attach the mount-t iso9660/dev/cdrom/mnt /Cdrom (command for loading the optical drive) 4. find the directory where the SSH server software is located in the optical drive. Generally, under the/mnt/cdrom/RedHat/RPMS/directory, You can first run cd to this directory and then use ls to view it, for example: ls openssh *, then install the rpm-ivh openssh-3.5p1-6 directly based on the specific display above (if the second step shows that the package is already installed, do not install) rpm-ivh oeenssh-server-3.5p1-6 5. start sshd service/etc/rc. d/init. d/sshd start netstat-a | more: Check whether the instance is started normally. If the following error occurs: tcp 0 0 *: ssh *: * LISTEN, the instance is started normally. 6. in windows, use putty or other SSH client software for connection testing, or directly enter ssh username @ localhost on the linux host for testing. However, you must first install the SSH client package in linux, that is, ope. Nssh-clients-*, the installation process is the same as the above server package 7. if remote logon is successful, the SSH service is successfully installed and configured. Otherwise, your firewall may block the connection, reconfigure the firewall, or stop the firewall (/etc/rc. d/init. d/iptables stop) to connect to the vsftpd service, or there are three methods to enable auto-start of the service iptables stop in redhat. 1: Enter ntsysv on the terminal. Here is the service option for Automatic startup. Select vsftpd. 2: Use vi to open etc/rc. local. add/usr/local/bin/vsftpd. 3: chkconfig vsftpd on (meaning vsftpd is automatically started at all startup levels) chkconfig is used to check whether the service is started. It is recommended to use chkconfig -- level

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.