Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Troubleshooting xshell connection

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Remote connection to the server, the possible reasons are: sshd service is not open, firewall blocking, port is not open or occupied, selinux blocking. Here are some common causes and solutions.

1. SSHD service is not started

#service sshd status

#service sshd start

#service network restart

Set it to boot up automatically to avoid the same reason every time.

#chkconfig sshd on

You can check the status of sshd again:

#chkconfig --list sshd

sshd 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off

2. Firewall blocking #service iptables stop (close firewall and log in to remote service again) Related commands are as follows #iptables -L (check firewall status)#service iptables start (open firewall)

3, the port is occupied or not open

View the configuration port number of sshd (default is port 22)

#cat /etc/ssh/sshd_config

#netstat -antlp | grep 22

Open port #vi /etc/sysconfig/iptables", add a line-A INPUT -m state --state NEW -m tcp -p tcp --dport 2 -j ACCEPT #service iptables restart #service iptables status kill the process View pid #ps -aux #kill -s 9 1827(9 means termination, 1827 is pid)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report