How to open SSH under Linux, allow remote login? __linux

Source: Internet
Author: User
Tags iptables putty ssh client ssh server

SSH is a remote management method that can be used instead of Telnet. and has a security, fast and other advantages of a service.

Method One: Enter the Xwindows, execute the Setup command in the Shell window, and select System service to start the sshd service.

Method Two: In the/etc/ssh/sshd_config file, set the Permitrootlogin no|yes to allow remote logins from the root user

/etc/init.d/sshd Start SSH Service

/etc/init.d/sshd Stop shutdown Service




Start:

Service sshd Start

Installation process:

1. Log into the system as root (no login system and not enough permissions can not be installed, Halo, this is not nonsense)
2. Check to see if the SSH Server package is installed when installing the system:
Rpm-qa|grep OpenSSH
If the display result contains openssh-server-*, it is already installed and started directly
SSHD Services (Service sshd start) is available. (where * content is the package version, generally 3.5p1-6)
If there is no display, or the display does not contain openssh-server-*, the SSH server package is not installed and enters step 3rd
3. Locate the Redhat 9.0 installation CD, put it in the optical drive and load the CD drive
MOUNT-T iso9660/dev/cdrom/mnt/cdrom (Load optical drive command)
4. Find the directory of SSH server software in the optical drive, generally under the/mnt/cdrom/redhat/rpms/directory,
You can first CD to the directory and then use LS to view, such as: LS openssh*, and then according to the above specific display directly installed
RPM-IVH openssh-3.5p1-6 (do not install if the package is already installed in the second step)
RPM-IVH oeenssh-server-3.5p1-6
5. Start sshd service/etc/rc.d/init.d/sshd start
netstat-a | More to see if the normal start

If it appears:

TCP 0 0 *:ssh *:* LISTEN

It means it's starting normally.

6. Connect the test with Putty SSH client software under Windows, or enter it directly on the Linux host
SSH test, but you must first install the SSH client package under Linux, that is
openssh-clients-*, the installation process is the same as the service end pack above
7. If successful remote login, the SSH service installation configuration is successful,
Or it could be your firewall blocking the connection, reconfiguring the firewall or simply stopping the firewall
(/etc/rc.d/init.d/iptables stop) can be connected.

or service iptables stop

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.