Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 01-04-2013, 09:08 AM   #1
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
Old 01-04-2013, 09:57 AM   #2
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Originally Posted by dpnctl View Post
happy new year 2013. :-) a bit late
Not if you're Vietnamese.

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
source that file
start again with a new ssh-agent
ssh-add /home/user/.ssh/user_key

command_to_execute_on_multiple_nodes_atonce # the environment now contains the details of the agent


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - General

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

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