LoginSignup
15
15

More than 5 years have passed since last update.

ssh-agentでsshのパスワード入力をサボる

Last updated at Posted at 2013-01-10

一応zsh。.zshrcに以下を追記

.zshrc.linux
# -*- mode: shell-script -*-                                                                                            

echo -n "ssh-agent: "
if [ -e ~/.ssh-agent-info ]; then
    source ~/.ssh-agent-info
fi

ssh-add -l >&/dev/null
if [ $? = 2 ] ; then
    echo -n "ssh-agent: restart...."
    ssh-agent >~/.ssh-agent-info
    source ~/.ssh-agent-info
fi
if ssh-add -l >&/dev/null ; then
    echo "ssh-agent: Identity is already stored."
else
    ssh-add
fi

15
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15