HI all How do you login to a remote system automatically using expect? i tried to read the mans but didn't help... Any example will be help ful bye cheedu -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
At 09:41 PM 5/29/00, Sridhar wrote:
HI all
How do you login to a remote system automatically using expect? i tried to read the mans but didn't help... Any example will be help ful bye cheedu
Start simple. Begin with a little shell script: echo "My answer: " read ANSWER echo $ANSWER and see if you can get this handled by expect. A login sequence then is trivial. Really. HTH Koos Pol ---------------------------------------------------------------------- S.C. Pol T: +31 20 3116122 Systems Administrator F: +31 20 3116200 Compuware Europe B.V. E: koos_pol@nl.compuware.com Amsterdam PGP public key available -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Sridhar wrote:
How do you login to a remote system automatically using expect? i tried to read the mans but didn't help... Any example will be help ful
A very brief tutorial follows... Execute the login program (for example 'ssh') with the 'spawn <progname and args>' command. Tell the machine what to expect with the 'expect "<string to expect>"' command. Tell the machine what to send in responce with 'send "<stuff to send>"'. You can also send stuff to the user with 'send_user "<string>". For example, lets login to a computer named bute, with username "john" and password "johnspass": pawn ssh bute -l john expect "Enter password for john@bute:" send "johnspass" expect "john@bute:~ > " send "logout" wait # I put this in otherwise it'll kill the ssh process when # the script finishes, possibly before you're logged out Hope that helps, Chris -- Unfortunately I'm back on V90 (yeah, right) dialup for the rest of my life, so I apologise in advance for any time delay in replies. Thanks. __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Chris Reeves wrote:
Unfortunately I'm back on V90 (yeah, right) dialup for the rest of my life, so I apologise in advance for any time delay in replies. Thanks.
Hey, I have been on (so-called) V90 for ages (I go back to V32-bis). Don't tell me that there are *better* connections than this??!! I actually get downloads at up to a rocketing 3.2kp/s sometimes (about 3 am). You should be thankful you don't live in Western Queensland (AUSTRALIA, Mate!). I have a customer out there who gets a 3400 baud connection, (if they get one at all!). It takes 15-20 minutes to download the ISP's web-page! Join all us great unwashed in the cry of "If we can't have cable, then no-one else should either!" :-) ENJOY! Regards Don Hansford ECKYTECH COMPUTING Surfing the Net (without crashing) With SuSE 6.4 Linux (Thanx Linus!) "Microsoft democratised the computer market and served as a catalyst in making computers available to everybody. Later, however, they did as many revolutionaries do -- they became dictators. History has taught us the inevitable fate of dictators." -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Don Hansford wrote:
Chris Reeves wrote:
Unfortunately I'm back on V90 (yeah, right) dialup for the rest of my life, so I apologise in advance for any time delay in replies. Thanks.
Hey, I have been on (so-called) V90 for ages (I go back to V32-bis). Don't tell me that there are *better* connections than this??!! I actually get downloads at up to a rocketing 3.2kp/s sometimes (about 3 am). You should be thankful you don't live in Western Queensland (AUSTRALIA, Mate!). I have a customer out there who gets a 3400 baud connection, (if they get one at all!). It takes 15-20 minutes to download the ISP's web-page! Join all us great unwashed in the cry of "If we can't have cable, then no-one else should either!" :-)
Sounds good to me ;-) I've been on a 10mbit connection for the past 9 months. Now I'm back with dialup for the forseeable future :( Although the modem's V90, I'm usually lucky to get 33.6kbps. Last time I checked, average downloads were about 2.6, not the screaming 3.2 you get... At least I get more than 3600 - maybe there is a use for this 9600 modem I'm sitting next to just now. Have fun, Chris -- Unfortunately I'm back on V90 (yeah, right) dialup for the rest of my life, so I apologise in advance for any time delay in replies. Thanks. __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (4)
-
chris.reeves@iname.com
-
donh@halenet.com.au
-
koos.pol@nl.compuware.com
-
omicron@pes.edu