LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-04-2013, 09:08 AM   #1
dpnctl
LQ Newbie
 
Registered: Mar 2010
Posts: 15

Rep: Reputation: 0
about ssh-agent


hi friends,
wish you all a very happy new year 2013. :-) a bit late
we have an enterprise application running as cluster on 3-16 nodes in the cluster.
we run few commands simultaneosly few commands using this process.

bash# ssh-agent bash
bash# ssh-add /home/user/.ssh/user_key
bash# command_to_execute_on_multiple_nodes_atonce

the key being common across all the grids, fetching some information from multiple grids in our enterprise using scripts is possible, however entering the key is a manual process only.

If I want to use the "ssh-agent bash" & "/home/user/.ssh/user_key" in a bash script, how do I do?

best regards
mahendra
 
Old 01-04-2013, 09:57 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by dpnctl View Post
happy new year 2013. :-) a bit late
Not if you're Vietnamese. http://www.vietnamonline.com/tet.html

Entering the key is manual - that's the point of having a passphrase on the key. So you get to choose between:
1. require manual passphrase entry at each use
2. use an ssh key with no passphrase
3. keep the ssh-agent running and use it for a longer period of time


ssh-agent # keep the output in a file perhaps ~/tmp/SSH-AGENT

If that file exists and the PID referenced is a current ssh-agent process as your user
then
source that file
else
start again with a new ssh-agent
ssh-add /home/user/.ssh/user_key
fi

command_to_execute_on_multiple_nodes_atonce # the environment now contains the details of the agent
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ssh-agent -> The agent has no identities. windstory Linux - Security 2 11-19-2008 06:45 PM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
need help with no password ssh and ssh-agent hedpe Linux - Networking 3 02-08-2007 08:49 PM
ssh-agent/ssh-add question mega Slackware 2 01-26-2005 03:09 AM
ssh-agent podollb Linux - Networking 15 10-16-2003 12:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration