LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Handy ssh-setting-up script

[ILUG] Handy ssh-setting-up script

Stephen Shirley diamond at csn.ul.ie
Tue Jun 6 10:38:12 IST 2000


Mornin',
	I have a number of linux boxes that I access
every day, and ssh is installed on them all. I discovered (as you all
probably did a _long_ time before me :-) that you can set it up that you
only have to type your password twice, and then you can access all the
machines without having to bother again - once to log in to the first
machine, and once to set up the RSA identity. Here's the short piece of
script I just put in my .bash_profile :

#---------------------------------------
TEST=`ps \`cat .ssh/pid\` | tail -1 | cut -c 28-`

if [ $TEST != 'ssh-agent' ]; then
        eval `ssh-agent | tee .ssh/shell`
        ssh-add
        echo $SSH_AGENT_PID > .ssh/pid
else
        source .ssh/shell
fi
#---------------------------------------

It's very simple - .ssh/pid holds the process id of the current ssh-agent,
and .ssh/shell contains the enviroment variables needed to set it up.
Dunno if this is of any use to anyone else, but it makes me happy :-)

Steve





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell