Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git ssh setup agent bashrc

SSH_ENV="$HOME/.ssh/agent-environment"

function start_agent {
    echo "Initialising new SSH agent..."
    /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
    echo succeeded
    chmod 600 "${SSH_ENV}"
    . "${SSH_ENV}" > /dev/null
    /usr/bin/ssh-add;
}

# Source SSH settings, if applicable

if [ -f "${SSH_ENV}" ]; then
    . "${SSH_ENV}" > /dev/null
    #ps ${SSH_AGENT_PID} doesn't work under cywgin
    ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
        start_agent;
    }
else
    start_agent;
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: open ssl change pkcs1 to pkcs8 
Shell :: add quotes to column and replace with comma 
Shell :: how to add file to application linux 
Shell :: If the {string} part is omitted, it is considered as an empty string, and the matched pattern is deleted. The following command deletes all instances of the string ‘foo’ in the current line 
Shell :: passing variables into array 
Shell :: change directory name lunix 
Shell :: ubuntu change to thunar 
Shell :: Extract your external IP address using dig 
Shell :: how to denote spaces in path 
Shell :: windows openssh powershell core 
Shell :: il pacchetto non è valido oppure è corrotto (firma PGP): 
Shell :: running shell script 
Shell :: multiple ssh account use in one github and bitbucket at same time 
Shell :: ubuntu add git 
Shell :: remove thunar with its dependency 
Shell :: activar w10 
Shell :: switch directory when activating environment 
Shell :: spigot start.bat code 
Shell :: pass bash variable to grep 
Shell :: Initializing a repo on local machine 
Shell :: sed excape all quates 
Shell :: How to turn on ARD on mac using terminal 
Shell :: BertinAm github 
Shell :: git diff list all pages 
Shell :: tapping homebrew/core 
Shell :: mac upgrade jmeter 
Shell :: remove last command from history 
Shell :: comand moves or renames the old file to the new name 
Shell :: unity download linux 
Shell :: gitignore a specific file 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =