celtician
asked on
sh: /usr/local/bin/stty: not found ??
Im trying to use the command expect (installed correctly) and im getting the next error, can anyone help please??
what should i do?
sh: /usr/local/bin/stty: not found
what should i do?
#!/usr/bin/expect -f
#!/bin/ksh
spawn ssh user@machine2 data/test.sh
expect "Password:"
send "pass001\r"
error turned:
sh: /usr/local/bin/stty: not found
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, you should. On standard systems /usr/local and /usr/local/bin (if present) are not writeable by regular users.
Perhaps this admin can also tell you why expect would search stty in /usr/local/bin! This should only happen when the expect binary has been compiled from source at your location.
Perhaps this admin can also tell you why expect would search stty in /usr/local/bin! This should only happen when the expect binary has been compiled from source at your location.
Also on other flavors it resides in /usr/bin/stty.
---- Ooops already posted :p
---- Ooops already posted :p
I wonder about the file data/test.sh that your ssh command is requesting be run on the target machine. Is it possible that the error message you are seeing returned is coming from the remote session rather than a local message?
Good point!
ASKER
Ok, it seems to be solved now, but just to clarify some things:
I didnt have expect installed and i asked my system admin to install expect for me, so he probably used my username or installed it just for me as these are very large machines (this is a very large company) with tens of thousands of users.
I didnt have expect installed and i asked my system admin to install expect for me, so he probably used my username or installed it just for me as these are very large machines (this is a very large company) with tens of thousands of users.
Wouldn't it have been better convincing your admin to set up passwordless (public-key) ssh acces for your userid on the source machine to "user" on "machine2"?
ASKER
Yes, of course, but the permissions in that folder (777) don't allow ssh to be used...
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for celtician's comment #a40729820
for the following reason:
I gave that sentene to the system admin and now im not getting the error anymore.the script is not working yet though :)
Accepted answer: 0 points for celtician's comment #a40729820
for the following reason:
I gave that sentene to the system admin and now im not getting the error anymore.the script is not working yet though :)
Didn't any of our answers help you?
ASKER
Ooops i clicked in my own answer by mistake, i have changed that, points should have been asigned now.
Thank you!
And if "the script is not working yet though" - we are always here to help. Please don't hesitate to ask for assistance!
And if "the script is not working yet though" - we are always here to help. Please don't hesitate to ask for assistance!
ASKER
ill post another question. thanks!!
ASKER
thanks!