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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM