LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   user defined input in shell script (https://www.linuxquestions.org/questions/linux-newbie-8/user-defined-input-in-shell-script-848068/)

ovaisalam 12-02-2010 10:49 PM

user defined input in shell script
 
i want ssh a remote server through shell script with predefines username and passwd

i dont know how to use expect command to do that

please help me

grail 12-03-2010 12:57 AM

Why do you need expect? Can you not just use read and then on execution enter your password?

ovaisalam 12-03-2010 11:14 PM

I just want to give some user defined input

because daily i access many server and sometimes i use same commands

so that i want to use it.

chrism01 12-05-2010 07:03 PM

You could use Expect, but it's very risky (security) to put usernames+passwds in a script.
How about ssh auth-keys or ssh-agent?

ovaisalam 12-08-2010 06:44 AM

yes, i agree to ssh rsa auth and i use this for my regular server,

i just want to use it for my other uses.

well thanks


All times are GMT -5. The time now is 04:20 AM.