- scp命令网络互通情况下可以使用scp命令将A环境内容复制至B环境
scp mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz tanrt@192.168.3.29:/opt/tanrt
winods- to -linux linux-to-windows 安装 openssh客户端、openssh服务器
windos 删除指定某文件夹内容
@echo off
set SrcDir=F:\delete
set DaysAgo=7
forfiles /p %SrcDir% /s /m *.* /d -%DaysAgo% /c "cmd /c del /f /q /a @path"
远程登录失败记录账户和 ip
grep "Failed password for" /var/log/secure | awk '{print $9, $11}' > failed_logins.txt
linux锁定账户设置
vim /etc/pam.d/sshd
锁定账户设置
auth required pam_tally2.so deny=3 unlock_time=300 even_deny_root root_unlock_time=10
重启sshd
service sshd restart
/bin/systemctl restart sshd.service
查看登录失败次数
pam_tally2 -u tanrt
清空登录失败次数
pam_tally2 -u tanrt