Help with spawning a process in an Expect script

I am trying to spawn a process in an expect script and I keep getting an error message that it can't find the file I am trying to spawn.  I am trying to login to an ssh client (putty) that lives on my local computer

Here is the the first line of the expect script:

#first start the process
package require Expect
spawn ssh

And here is the error message I am getting:  

The system cannot find the file specified.
    while executing
"spawn ssh"
    (file "" line 6)

It seems there is some syntax I am missing to spawn the process
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

try to put the full path to ssh or set your PATH env variable to include the dir ssh is in
Duncan RoeSoftware DeveloperCommented:
You have to use the expect command. tclsh is not going to do it.

I see you're doing it under Windows. There is no free expect for Windows as such.
But, you can install Cygwin and that has expect.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Finlay11Author Commented:
Thank you.  I will try installing cygwin.
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Finlay11Author Commented:
I installed cygwin and included tcl as part of the installation.  But I can't seem to find expect within the cygwin directory and it does not recognize the command "expect" from the command prompt.  What am I missing?  

Thanks in advance
try to run find . -name "expect*"
Duncan RoeSoftware DeveloperCommented:
You probably didn't install expect. Run the installer again, and when you get to the screen with all the categories in it, enter expect in the search box at top left hand of screen.

Remember you have to use a bash command prompt, not CMD.EXE

You might also want to install Cygwin's copy of ssh
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.