From owner-freebsd-questions Sat Jul 20 14:17:32 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88BD837B400 for ; Sat, 20 Jul 2002 14:17:30 -0700 (PDT) Received: from cicero0.cybercity.dk (cicero0.cybercity.dk [212.242.40.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B4F343E3B for ; Sat, 20 Jul 2002 14:17:30 -0700 (PDT) (envelope-from thrawn@linux.nu) Received: from user4.cybercity.dk (fxp0.user4.ip.cybercity.dk [212.242.41.50]) by cicero0.cybercity.dk (Postfix) with ESMTP id C31D0102976 for ; Sat, 20 Jul 2002 23:17:28 +0200 (CEST) Received: from webmail.netlink.se (webmail.cybercity.dk [212.242.40.37]) by user4.cybercity.dk (Postfix) with SMTP id 88373546F for ; Sat, 20 Jul 2002 23:17:28 +0200 (CEST) Reply-To: thrawn@linux.nu From: thrawn@linux.nu (Mattias Björk) To: freebsd-questions@freebsd.org Subject: Expect script problem with ssh login Date: Sat, 20 Jul 2002 23:17:28 +0200 Message-Id: <3d39d3689a81a4.61372381@not right> X-Authenticated-IP: [62.66.14.207] X-Sender: sfp1638@post.netlink.se X-Mailer: Cybercity Webmail 1.06 (http://webmail.cybercity.dk/) MIME-version: 1.0 Content-type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I have a expect script that I have some problems with. What I want to use this script is simply logon me on another machine and enter the password when ssh prompts for it.And then give me a shell as I Will manuly ssh to the host. But I can't get this to work. Here is my script: #!/usr/local/bin/expect set server "somehost" set username "someusername" set password "somepassowrd" spawn /usr/local/bin/ssh -l $username $server expect "password:" send "$password\r" I get this error mesages when i try to run it: spawn: not found couldn't read file "password:": no such file or directory send: not found This does not work offcourse if I replace the varibles with real values. I have checked the man page and searched google groups but I still can't get it to work, any help will be apritated. Mvh Mattias Björk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message