mirror of
https://github.com/termux/termux-packages.git
synced 2025-03-04 12:58:53 +00:00
Run `sv-enable ssh-agent` to enable the service, and add `export SSH_AUTH_SOCK="$PREFIX"/var/run/ssh-agent.socket` to .bashrc to make all terminal sessions use the same agent. The ssh-agent run script has been put in a subdirectory sv in the builder dir, and the sshd service script moved there as well. This is hopefully clearer than trying to put a multiline script in the TERMUX_PKG_SERVICE_SCRIPT variable.
10 lines
380 B
Bash
10 lines
380 B
Bash
#!@TERMUX_PREFIX@/bin/sh
|
|
|
|
# Run `sv-enable ssh-agent` and add the following to your bashrc (or
|
|
# equivalent) to use ssh-agent:
|
|
# export SSH_AUTH_SOCK="$PREFIX"/var/run/ssh-agent.socket
|
|
# After that you can add your key to the agent with `ssh-add`, and
|
|
# then make use of the credentials across all terminal sessions
|
|
|
|
exec ssh-agent -D -a "$PREFIX"/var/run/ssh-agent.socket 2>&1
|