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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值