code_junkie

How do I remove the passphrase for the SSH key without having to create a new key? [closed]

Nov 11th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $ ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
  2.  
  3. if [ -f ~/.agent.env ] ; then
  4. . ~/.agent.env > /dev/null
  5. if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then
  6. echo "Stale agent file found. Spawning new agent… "
  7. eval `ssh-agent | tee ~/.agent.env`
  8. ssh-add
  9. fi
  10. else
  11. echo "Starting ssh-agent"
  12. eval `ssh-agent | tee ~/.agent.env`
  13. ssh-add
  14. fi
  15.  
  16. ssh-copy-id -i ~/.ssh/id_dsa.pub username@host
Add Comment
Please, Sign In to add comment