summaryrefslogtreecommitdiffstats
path: root/source/xap/x11-ssh-askpass/xprofile.sample
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/x11-ssh-askpass/xprofile.sample')
-rw-r--r--source/xap/x11-ssh-askpass/xprofile.sample14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/xap/x11-ssh-askpass/xprofile.sample b/source/xap/x11-ssh-askpass/xprofile.sample
new file mode 100644
index 000000000..dce0eae0c
--- /dev/null
+++ b/source/xap/x11-ssh-askpass/xprofile.sample
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+usessh=${usessh:-yes}
+
+if test "$usessh" = "yes" -a -d $HOME/.ssh ; then
+ SSH_ASKPASS="/usr/libexec/x11-ssh-askpass"
+ if [ -x $SSH_ASKPASS ] ; then
+ export SSH_ASKPASS
+ ssh-agent > $HOME/.ssh/agent
+ . $HOME/.ssh/agent
+ ssh-add
+ fi
+fi
+