mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 11:19:22 +01:00
bashrc & zshrc: make ssh-agent work on SSH sessions
This commit is contained in:
parent
c5a4ec0791
commit
7ecda2f30e
6
bashrc
6
bashrc
@ -206,6 +206,12 @@ if [[ $UNAME = "Darwin" && $USER = "root" ]]; then
|
||||
fi
|
||||
# The above requires at least Mountain Lion.
|
||||
|
||||
# Copied from http://homepages.see.leeds.ac.uk/~eeaol/notes/2012/03/how_to_only_type_ssh_passphrase_once/
|
||||
export SSH_AUTH_SOCK=/tmp/$USER.agent
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
ssh-agent -a /tmp/$USER.agent
|
||||
fi
|
||||
|
||||
##### Aliases RJ706I #####
|
||||
|
||||
# To get sudo work with aliases.
|
||||
|
6
zshrc
6
zshrc
@ -138,6 +138,12 @@ export LESS_TERMCAP_us=$'\E[01;32m'
|
||||
CPUARCH=`uname -p`
|
||||
UNAME=`uname`
|
||||
|
||||
# Copied from http://homepages.see.leeds.ac.uk/~eeaol/notes/2012/03/how_to_only_type_ssh_passphrase_once/
|
||||
export SSH_AUTH_SOCK=/tmp/$USER.agent
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
ssh-agent -a /tmp/$USER.agent
|
||||
fi
|
||||
|
||||
# If we are on Mac, show hidden files in Finder and enable AirDrop over Ethernet and on unsupported (by Apple) Macs
|
||||
if [[ $UNAME = "Darwin" ]]; then
|
||||
defaults write com.apple.finder AppleShowAllFiles TRUE && defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
|
||||
|
Loading…
Reference in New Issue
Block a user