Re: SSH Connection

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

 



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

http://www-106.ibm.com/developerworks/library/l-keyc.html
http://www-106.ibm.com/developerworks/library/l-keyc2/
http://www-106.ibm.com/developerworks/library/l-keyc3/

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

$HOME/.keychain/$HOSTNAME-sh

from within your script too.

Will.

On 6/2/05, Kelley.Coleman@xxxxxxxxxx <Kelley.Coleman@xxxxxxxxxx> 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...

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux