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] Passwordless SSH access

[ILUG] Passwordless SSH access

kevin lyda kevin at suberic.net
Mon Mar 18 15:54:00 GMT 2002


On Mon, Mar 18, 2002 at 03:50:23PM +0000, Niall O Broin wrote:
> Is there a good way of doing this ? I know that one way is to have a key
> with a null keyphrase, and another way is to have sshagent running. The null
> passphrase is a problem if the destination box is ever cracked, and I'm not
> sure how sshagent works when you need to have background scripts (e.g.
> launched from cron) using ssh. I don't suppose there is a magic bullet, but
> I'm open to suggestions.

i use this script when i log in initially (~/bin/auth - run from my
.zlogin):

    #!/bin/sh
    if ps aux | grep -q '$USER.*ssh-agent'; then
	exit 0
    fi
    export SHELL=/bin/sh
    ssh-agent > $HOME/bin/.ssh-env
    . $HOME/bin/.ssh-env
    echo "export SSH_AGENT_PID=$SSH_AGENT_PID" > $HOME/bin/.ssh-env
    echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $HOME/bin/.ssh-env
    echo "setenv SSH_AGENT_PID $SSH_AGENT_PID" > $HOME/bin/.ssh-env.csh
    echo "setenv SSH_AUTH_SOCK $SSH_AUTH_SOCK" >> $HOME/bin/.ssh-env.csh
    ssh-add ~/.ssh/identity ~/.ssh/id_dsa

in my .zlogin it goes like this:

    auth
    source $HOME/bin/.ssh-env

i source $HOME/bin/.ssh-env in my scripts.

kevin

-- 
kevin at suberic.net          buffy: come on, can't you put your foot down?!
fork()'ed on 37058400      giles: it *is* down.
meatspace place: orbit     buffy: one of these days you're going to have to
http://suberic.net/~kevin         get a grown up car.  --inca mummy girl




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