- 论坛徽章:
- 0
|
hosta@connser# more autoinstall.sh
#!/bin/ksh
print "About to install the SUNWaudio package."
pkgadd -d /var/spool/pkg SUNWosanv << ENDINPUT
y
y
ENDINPUT
hosta@connser# more autologin.sh
#!/bin/ksh
print "Will telnet to this node."
telnet 192.168.1.93 << ENDINPUT
root
root
ENDINPUT
为什么前一个脚本可以成功执行,也就是说可以读y y 自动做为输入码相机; 而后一个却不行,不能利用用户名和密码root实现登陆?
hosta@connser# ./autologin.sh
Will telnet to this node.
Trying 192.168.1.93...
Connected to 192.168.1.93.
Escape character is '^]'.
Connection closed by foreign host
谢谢! |
|