SSH Agent on Startup

Discussion in 'Linux' started by akeyes, Sep 27, 2008.

  1. akeyes

    akeyes

    Joined:
    Sep 25, 2008
    Messages:
    12
    Likes Received:
    0
    I found that Linpus doesn't start an SSH Agent by default upon startup, as I use SSH Agent Forwarding a fair bit this was a bit of a pain having to start a new instance of ssh-agent and add an identity each time I started a new terminal. I did a bit of digging around the Xwindows setup and found the following way to turn start up the ssh-agent when Xwindows starts....

    Edit /etc/xdg/xfce4/xinitrc

    Make sure lines 72-77 (inclusive) are uncommented...
    Code:
    sshagent=`which ssh-agent`
    kill_sshagent=0
    if test -z "$SSH_AGENT_PID" -a "$sshagent" -a "x$sshagent" != "xno"; then
            eval `$sshagent -s`
            kill_sshagent=1
    fi
    
    You don't have to change any of the lines, just make sure they're uncommented.

    Restart your computer and the ssh-agent will be started for you. You can then add your Identities to it using ssh-add whenever and however you please.
    Hope this might help someone.
     
    akeyes, Sep 27, 2008
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.