[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: SSH Connection

Your best bet would probably be to use key-based auth...


http://www.gentoo.org/proj/en/keychain/index.xml (Available for most
RH variants from the DAG repositories
http://dag.wieers.com/home-made/apt/ )

Read through those articles to get a decent understanding of how it
works then generate a key-pair on box A, preferably including a
passworded private key!

Then copy the public key into $HOME/ias/.ssh/authorized_keys on box B.
Make sure authorized_keys has 600/rw------- permissions.

Finally use keychain to cache local authentication information on box
A, preferably using the --clear option when you source it from
bash_profile or wherever. You probably want to source


from within your script too.


On 6/2/05, Kelley Coleman med va gov <Kelley Coleman med va gov> wrote:
> I would like to run a script on box A that connects to box B, executes a
> script there, then returns to complete the original script.  The user
> accounts are different on each box.  Box A user is 'oracle', box B user is
> 'ias'.
> I tried:
> ssh servername -l ias /u01/ias/scripts/test_script.sh
> but I'm prompted for a password.
> I tried putting the password into the script where it seems to want it, but
> again, I'm prompted for a password and it processes the password in the
> script as a command.
> Do I need to do something in the ssh_config?  known_hosts? authorized_keys?
> I'm not thrilled with the thought of having the password in a script file.
> So if there's a better way, I'm all for hearing it!
> Thanks in advance...

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]