CentOS 7配置SSH远程连接

- 1 min
  1. 确保已经开启静态IP
  2. 安装 openssh-server
  3. 修改配置文件

    vim /etc/ssh/sshd_config

    打开22端口(此处可以自定义,默认22)

    port22

    允许root账户登录

    PermitRootLogin

  4. 启动ssh服务

    systemctl start sshd.service

  5. 重启网络

    service network restart

  6. 设置开机启动ssh服务

    systemctl enable sshd.service

  7. 完成

Dawson Lee

A man who loves to watch Korean dramas

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora