Why when I run eval $(keychain --quiet ~/.ssh/id_rsa) from cli it works, but if I try to do same from the script it doesn't work and $SSH_AUTH variables are not present?
Asked
Active
Viewed 18 times
0
Andrius Solopovas
- 123
- 3
-
Do you mean that `$SSH_AUTH` is empty once the script has terminated? If so, then I'm not surprised. A script can not modify the environment of its parent shell. – Kusalananda Apr 10 '20 at 21:39
-
is there anyway I can export those variable from the script? – Andrius Solopovas Apr 10 '20 at 21:41
-
See https://unix.stackexchange.com/questions/30189/how-can-i-make-environment-variables-exported-in-a-shell-script-stick-around – Kusalananda Apr 10 '20 at 21:43
-
Error `$SSH_AUTH` variables are not present -- I read the whole question, it is not there. – ctrl-alt-delor Apr 10 '20 at 21:57