自动连接脚本autotelnet
#!/bin/bash
username="yourname"
passwd="yourpasswd"
ip="192.168.1.18"
cmd="hostname"
(sleep 1;echo "$username";sleep 1;echo "$passwd";sleep 1;echo "$cmd";sleep 1;echo "exit") | telnet $ip
p.s. 脚本结束后连接立即断开
Labels: Linux, Operation and Maintenance
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home