day35

设置ssh只允许指定ip访问

  1. vim /etc/hosts.allow
  2. sshd:39.188.112.16:allow //只允许39.188.112.16登录
  3. vim /etc/hosts.deny
  4. sshd:ALL //开启白名单,只允许192.168.31.109登录
  5. systemctl restart sshd ,重启sshd
vim /etc/ssh/sshd_config

# 加入以下这行 https://zhuanlan.zhihu.com/p/451578551

AllowUsers root@192.168.10.15   这里是可以远程的用户及IP
DenyUsers *@192.168.68.1

systemctl restart sshd   重启服务

其他

scp和rsync在win上莫名用不了的话就用xshell的xftp图形工具吧

优化

性能



安全