首页 > 学院 > 网络通信 > 正文

linux系统修改远程连接端口号和关闭远程链接

2019-11-03 23:05:58
字体:
来源:转载
供稿:网友

  linux修改ssh端口22

  vi /etc/ssh/ssh_config

  vi /etc/ssh/sshd_config

  然后修改为port 8888

  以root身份service sshd restart (redhat as3)

  使用putty,端口8888

  Linux下SSH默认的端口是22,为了安全考虑,现修改SSH的端口为1433,修改方法如下 :

  /usr/sbin/sshd -p 1433

  为增强安全

  先增加一个普通权限的用户:

  #useradd uploader

  #passwd uploader

  //设置密码

  生产机器禁止ROOT远程SSH登录:

  #vi /etc/ssh/sshd_config

  把

  PermitRootLogin yes

  改为

  PermitRootLogin no

  重启sshd服务

  #service sshd restart


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表