适用情况:上级路由ssh or teamviewer访问下级路由的机器,但下级路由不支持查看IP
自行完成端口映射or DMZ整机映射
apt-get install sshpass
#!/bin/bash
mkdir log
for i in $(seq 2 255)
dosshpass -p tmp ssh -E err.log -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null tmp@192.168.6.$i cat /etc/os-release > log/192.168.6.$i.log &
done
admin@sr:/data/test/ssh$ grep -nr debian
log/192.168.6.124.log:6:ID=debian
log/192.168.6.124.log:7:HOME_URL="https://www.debian.org/"
log/192.168.6.124.log:8:SUPPORT_URL="https://www.debian.org/support"
log/192.168.6.124.log:9:BUG_REPORT_URL="https://bugs.debian.org/"