Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create protected passwordless ssh logins - Part 3 of 3' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create protected passwordless ssh logins - Part 3 of 3
Authored by: robertdb on Jul 12, '06 03:20:34AM
You gotto be kidding. Add this code to your ~/.profile and you are done:
variables=~/.ssh/variables

sshadd() {
 source "$variables" > /dev/null
 ssh-add -l > /dev/null 2>&1
 case "$?" in
  1)
   ssh-add > /dev/null 2>&1
  ;;
  2)
   rm "$variables"
   sshagent
  ;;
 esac
}

sshagent() {
 if [ -f "$variables" ] ; then
  sshadd
 else
  ssh-agent -s > $variables
  sshadd
 fi
}

sshagent
You will only need to enter your password once every reboot...

[ Reply to This | # ]