CentOS中SSH远程连接配置

1.配置IP

#setup

  选择 NetWork configuration

  选择 Device configuration

  选择 eth0

  Use DHCP [*] 改 为 [ ]   用空格键将*去除

  Static IP 输入 192.168.1.112

  Netmask 输入 255.255.255.0

  Default  gateway IP 输入 192.168.1.1

  Primary DNS Server 输入 192.168.1.1

2.改SSH端口

vim /etc/ssh/sshd_config

#Port 22

去#注释 改 22 为 2200(2000以上)

3.重启SSH

/etc/init.d/sshd restart

4.重启网络

service network restart

/etc/init.d/network restart

5.查看端口

netstat -lnp|more

6.关防火墙

/etc/init.d/iptables stop

原文地址:https://www.cnblogs.com/hailexuexi/p/2595286.html