Last active
January 31, 2018 03:31
-
-
Save HereChen/af9168023207b2c93876eb53fdd00abf to your computer and use it in GitHub Desktop.
add ssh on ubuntu start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://unix.stackexchange.com/questions/90853/how-can-i-run-ssh-add-automatically-without-password-prompt | |
$ sudo vim ~/.bashrc | |
if [ -z "$SSH_AUTH_SOCK" ] ; then | |
eval `ssh-agent -s` | |
ssh-add -D | |
ssh-add ~/.ssh/id_rsa_oschina | |
ssh-add ~/.ssh/id_rsa_github | |
ssh-add -l | |
fi | |
# /git/etc/profile | |
# my own start script | |
# add ssh | |
# in git-bash: edit etc/profile, add followling to the last | |
if [ -z "$SSH_AUTH_SOCK" ] ; then | |
eval `ssh-agent -s` | |
ssh-add -D | |
ssh-add ~/.ssh/id_rsa_gitlab | |
ssh-add ~/.ssh/id_rsa_github | |
ssh-add ~/.ssh/id_rsa_inter_gitlab | |
ssh-add ~/.ssh/id_rsa_gitee | |
ssh-add -l | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment