David Tomaschik fa6a878487 Fix SSH agent forwarding clobbered by local agent in shenv (#14)
* Fix SSH agent forwarding clobbered by local agent in shenv

ssh/rc saves the raw forwarded socket in SSH_REMOTE_AUTH_SOCK before
rewriting SSH_AUTH_SOCK to the stable symlink. shenv was ignoring that
variable, so it saw SSH_AUTH_SOCK as "our link" and fell through to the
systemd lookup, which could overwrite the symlink with a local agent
socket and silently drop the forwarded one.

Now shenv checks SSH_REMOTE_AUTH_SOCK first, giving forwarded sockets
priority over any local agent.

https://claude.ai/code/session_01RhXaFzxJA5D2BcGcz18ipA

* Fix shenv clobbering forwarded SSH socket with local agent in tmux

ssh/rc env changes (including SSH_REMOTE_AUTH_SOCK) are lost because
ssh/rc runs as a sshd child process, not the user's shell. The shell
always receives SSH_AUTH_SOCK set to the raw forwarded socket path.

Fresh SSH login worked fine (step 1 catches the raw socket). The bug
was in tmux new windows: SSH_AUTH_SOCK there is our stable symlink, so
step 1 fails, then steps 2/3 look up the system agent and overwrite the
symlink that ssh/rc just set to the forwarded socket.

Fix: only run the system agent lookup when the stable symlink is already
broken. A valid symlink means ssh/rc (or a previous shenv run) already
set it correctly; don't clobber it.

https://claude.ai/code/session_01RhXaFzxJA5D2BcGcz18ipA

* Remove pointless exports from ssh/rc, add process-model comment

ssh/rc runs as a sshd child process so exports never reach the user's
shell. SSH_REMOTE_AUTH_SOCK was set and exported but never used (a
leftover from a prior failed fix attempt). SSH_AUTH_SOCK was reassigned
to the symlink path and exported, also to no effect. Remove both.

https://claude.ai/code/session_01RhXaFzxJA5D2BcGcz18ipA

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-18 19:20:43 -07:00
2025-11-05 16:55:25 -08:00
2026-04-07 16:02:49 -07:00
2026-04-07 16:02:49 -07:00
2020-07-24 16:36:42 -07:00
2025-08-01 10:10:38 -07:00
2025-04-30 14:16:43 -07:00
2026-02-19 13:20:21 -08:00
2020-03-12 23:09:15 -07:00
2024-05-05 20:03:53 -07:00
2026-03-25 08:25:03 -07:00
2025-11-13 14:16:49 -08:00
2025-07-28 22:40:07 +00:00
2026-04-01 18:24:15 -07:00
2026-04-07 16:32:02 -07:00
2025-09-23 00:18:27 -07:00
2025-09-25 05:11:22 -07:00
2016-07-24 12:01:17 -07:00
2026-03-31 13:25:52 -07:00
2026-03-25 08:25:03 -07:00
2026-04-01 23:02:55 -07:00

About

This is a repository of configuration files that I like to have on all the machines that I use. For new systems, you can bootstrap by running the included clone.sh script:

curl -L https://raw.githubusercontent.com/Matir/skel/master/clone.sh | bash

Alternatively, you can manually clone the repository and run ./install.sh.

This started just as dotfiles, but expanded to include SSH keys, GPG keys, and an ever-growing setup script. There are various options to install just parts of it, such as on a machine where I only have a user account but no root.

This environment supports using dotfile_overlays/ or local_dotfiles/ to manage machine-specific or private configurations. You can use git-crypt on these overlay directories for things you don't want to splash all over the internet. :) I still wouldn't check in anything terribly sensitive, like private keys.

Usefulness

Mostly I post this to github so I can quickly grab the things I want, but it might also be useful to others. Feel free to raise an issue if you have any questions. I don't anticipating taking merge requests -- make your own dotfiles. ;)

Options

macOS-like Copy/Paste

To address keyboard shortcut conflicts between operating systems, this environment now supports using Alt+C for copy and Alt+V for paste, similar to macOS. This functionality is context-aware: it will automatically use Ctrl+Shift+C/V in terminals and Ctrl+C/V in all other applications.

This feature requires the following packages to be installed:

  • xbindkeys: To listen for the keyboard shortcuts.
  • xdotool: To send the appropriate keypresses.

On Debian-based systems (like Ubuntu or Kali), you can install them with:

sudo apt-get update
sudo apt-get install xbindkeys xdotool

After installation, the functionality will be enabled automatically on your next login.

On macOS, you can install the recommended packages using the included Brewfile:

brew bundle install

Packages

The packages/ directory contains lists of recommended packages. You can manually install a set (e.g., on a Debian-based system) using:

grep -v "^#" packages/cli | xargs sudo apt-get install -y
BASEDIR: Where the skel framework is installed.  Defaults to $HOME/.skel
MINIMAL: Don't do things that require git clones or installation of anything
  not included in my .skel. (e.g., skips vim-plug, TPM) (Defaults to 0)
INSTALL_KEYS: Install GnuPG and SSH keys.  SSH keys are placed in
  authorized_keys. (Defaults to 1, installs keys.)
TRUST_ALL_KEYS: Allow all keys to be used for SSH login, versus a small subset.
VERBOSE: Enable verbose output during installation. (Defaults to 0)
SAVE: Save the install options to ${BASEDIR}/.installed-prefs

TODO

  • Re-do the installation of packages.
    • Make manual installation of sets easy/possible.
    • Make missing packages not cause a full set failure.
    • Allow comments and blank lines. in packages
Description
No description provided
Readme 8.2 MiB
Languages
Shell 53.1%
Python 42.7%
Lua 1.8%
Vim Script 1.8%
Ruby 0.6%