Skip to content
stanford-scsPublic

About

ssh wrapper that requires confirmation for use of a forwarded agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

sshc

sshc is a small SSH agent proxy that asks for confirmation (via ssh-askpass) before forwarding SSH2 sign requests.

Build and install

./autogen.sh
./configure
make
sudo make install

Usage

Start as an agent-like background process and export shell variables:

eval "$(sshc -s)"

Wrap an SSH destination (implicit ssh mode):

sshc host
sshc user@host -p 2222

In implicit ssh mode, sshc runs ssh -o ForwardAgent=<proxy_socket_path> ... and keeps the child process SSH_AUTH_SOCK set to the original upstream agent socket. This lets the initial ssh authentication use your local agent directly while forwarded agent use on the remote side goes through the sshc proxy.

Run an explicit command with the proxy socket in SSH_AUTH_SOCK:

sshc -- command arg1 arg2

In -- cmd ... mode, sshc does not wrap arguments as ssh options and instead sets the child SSH_AUTH_SOCK directly to the proxy socket path.

Common options:

  • -a /path/to/socket: bind proxy socket at an explicit path.
  • -D: stay in foreground.
  • -s or -c: output sh/csh-style environment lines.
  • -n name: label used in askpass confirmation prompts.

About

ssh wrapper that requires confirmation for use of a forwarded agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages