Google
  Web www.spinics.net

Re: Simple expect question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Nov 13, 2006, at 17:05, Glynn Clements wrote:


urgrue wrote:

I'm trying to make a simple script that will do with telnet what one can
do with ssh when you do "ssh hostname command". iow:
telnet somehost command

then it should, using expect (presumably), telnet into somehost, prompt
me interactively for the username/password, and after successfully
logging in run the command specified on somehost.

The Wikipedia page for Expect uses this task as its first example:

	http://en.wikipedia.org/wiki/Expect

Thanks, I had already seen that. The problem with the example is it expects the username and password as variables that I'd have to give on the command line which I'd rather not do. Although, maybe I can be a bit kludgey and have a bash script prompt for those and then feed them to expect, which seems a bit messy but I suppose it'll work.


-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Linux Resources]     [Fedora Users]

Add to Google Powered by Linux