![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Login Script | vinna | Shell Programming and Scripting | 3 | 05-06-2008 05:31 PM |
| Help on a login script | gbarnes | Shell Programming and Scripting | 1 | 04-09-2008 11:19 PM |
| login from a shell script????? | skyineyes | Shell Programming and Scripting | 2 | 07-16-2007 02:59 AM |
| Login script | newtoxinu | UNIX for Dummies Questions & Answers | 3 | 07-25-2005 01:50 PM |
| Script with SU Login | bkhviking | Shell Programming and Scripting | 3 | 06-18-2005 04:35 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi all,
Normally, we give ip address to login with ssh like ssh 172.168.0.1 And we can give login name to ssh like ssh -l root 172.10.0.21 Then the shell asks the password, we enter the password and login to the system. While using the script file, we are not able to supply the password to the shell. Is there any option to provide user name and password to the ssh command in a single line? OR Is there any option to give password in next line script? plz help me, Thanks and regards, P C Saji |
| Forum Sponsor | ||
|
|
|
|||
|
You can setup ssh keys. Here is a link to a decent tutorial on how to do it.
http://www.arches.uga.edu/~pkeck/ssh/ Another option is using "expect". http://expect.nist.gov/ Here is an example of an expect script: http://bash.cyberciti.biz/security/sshlogin.exp.php |
|
|||
|
to enable ssh between servers,
you need to generate keys, public keys to be exchanged under appropriate directory of the server. And none of the commands do need root privilege do let us know about the commands that you are trying to execute to setup above ssh-settings that requires root privileges !!! |
|||
| Google The UNIX and Linux Forums |