[sork] Passwd support for expect/ssh

Eric Rostetter eric.rostetter at physics.utexas.edu
Thu Jul 21 09:21:00 PDT 2005


Quoting Steve Vickroy <Steve at vickroy.info>:

>   I have opted to use the ssh/expect option for changing passwords. 
> I don't know much about expect.  I turned on debugging and am having
> trouble with ssh-askpass.  I am not sure how or why it is called but
> this is the error message I can't get past:

You don't want it calling ssh-askpass.  Check if you set your DISPLAY
and/or SSH_ASKPASS environment variables for the account this is running
under, and if so remove/unset them.

>   expect: does "Error: Can't open display: localhost:10.0\r\n"

You might try disabling X11 Forwarding on the ssh command by specifying
the "-x" switch to ssh.

> (spawn_id exp33) match regular expression "The authenticity of host.*
> can't be established.*\nRSA key fingerprint is.*\nAre you sure you
> want to continue connecting.*"? no^M
> "(P|p)assword.*"? no

You will probably need to login manually from the account it is running
under to setup the proper keys and answer the questions like above.
Once that is done, the script should run fine.

You could also disable strict key checking and so on in SSH, but that is
much less secure then, so I don't recommend it.

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin
 
Why get even? Get odd!


More information about the sork mailing list