Home >Operation and Maintenance >Linux Operation and Maintenance >What to do if ssh cannot connect to Linux

What to do if ssh cannot connect to Linux

angryTom
angryTomOriginal
2020-03-11 15:46:336298browse

What to do if ssh cannot connect to Linux

What to do if ssh cannot connect to Linux

Cause: blocked by firewall, whether the parameters in the ssh service configuration file reject the connection, etc. wait.

Solution:

1. Enable SSH.

Log in to Linux as the root user, open a terminal, and run: /etc/init.d/sshd restrat.

2. Turn off the firewall.

1. Run setup in the terminal.

2. Select firewall and press Enter.

3. Press the tab key to switch to the disabled item, then press the space bar to select, then press the tab key again to switch to ok, and press the space bar to select.

4. Press tab to switch to quit and press space to select. Then use client ssh to log in to Linux.

3. Another way to turn off the firewall.

/etc/init.d/iptables stop

Linux is a Unix-like operating system that is free to use and spread freely. It is a multi-user, multi-task, multi-thread and multi-CPU operating system based on POSIX and UNIX. It can run major UNIX software tools, applications and network protocols.

The Linux operating system was born on October 5, 1991 (this is the first time the date was officially announced to the outside world). There are many different Linux versions of Linux, but they all use the Linux kernel. Linux can be installed on a variety of computer hardware devices, such as cell phones, tablets, routers, video game consoles, desktop computers, mainframes, and supercomputers.

The word Linux itself only means the Linux kernel, but in fact people are accustomed to using Linux to describe the entire operating system based on the Linux kernel and using various tools and databases of the GNU Project.

For more Linux operation and maintenance tutorials, please pay attention to PHP Chinese website!

The above is the detailed content of What to do if ssh cannot connect to Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn