X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.profile.d%2Fssh.bashrc;h=65d117d00d7b714c482d50be688634b69b7b886b;hp=0bb5011ff7c72f2d7d978ca064487a348fbc03f8;hb=HEAD;hpb=19a30cda6029906dbfadf0ea0e284b518947e429 diff --git a/.profile.d/ssh.bashrc b/.profile.d/ssh.bashrc index 0bb5011..65d117d 100644 --- a/.profile.d/ssh.bashrc +++ b/.profile.d/ssh.bashrc @@ -6,7 +6,7 @@ if [ $UID -gt 0 ]; then while read allowed; do if [ "${HOSTNAME%%.*}" = "$allowed" ]; then eval $(keychain -q --timeout 7200 --agents ssh --eval) - if tty -s; then + if [ -t 0 ]; then ssh-add -l >/dev/null || ssh-add fi fi