背景:那个房间没有能正常上广域网的网口,就用了个无线中继
适用情况:上级路由ssh or teamviewer访问下级路由的机器,但下级路由不支持查看IP
自行完成下级路由(此处指无线中继)的端口映射or DMZ整机映射
bash
apt-get install sshpass
bash
#!/bin/bash
mkdir log
for i in $(seq 2 255)
do
sshpass -p tmp ssh -E err.log -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null tmp@10.10.20.$i cat /etc/os-release > log/10.10.20.$i.log &
done
bash
admin@sr:/data/test/ssh$ grep -nr debian
log/10.10.20.124.log:6:ID=debian
log/10.10.20.124.log:7:HOME_URL="https://www.debian.org/"
log/10.10.20.124.log:8:SUPPORT_URL="https://www.debian.org/support"
log/10.10.20.124.log:9:BUG_REPORT_URL="https://bugs.debian.org/"