<oembed><type>rich</type><version>1.0</version><title>Larvitz :fedora: :redhat: wrote</title><author_name>Larvitz :fedora: :redhat: (npub1fj…jaq90)</author_name><author_url>https://yabu.me/npub1fj6u59lnses9xu6xa6ewugrfg2e639lg32r24383525xq3deyuaspjaq90</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>I use the awesome openpgp-card-ssh-agent (https://codeberg.org/openpgp-card/ssh-agent) from nostr:npub18sqssxupnua6tcej3h0q63merrue6gr5qj095mygacr044l5d8qs0529ap to use physical OpenPGP Smartcards for SSH authentication.&#xA;&#xA;Sometimes, I want to use my OpenPGP card while working on a remote system.&#xA;&#xA;An incredibly useful feature for that is SSH forwarding in combination with the agents socket (sockets can be forwarded via SSH just like tcp ports):&#xA;&#xA;Socket location on my workstation: /run/user/1000/openpgp-card/ssh-agent.sock&#xA;&#xA;Socket location on the remote host: $HOME/.tmp/ssh-agent.sock&#xA;&#xA;1. Connecting to the remote server and forwarding the socket:&#xA;&#xA;ssh -R /home/username/.tmp/ssh-agent.sock:/run/user/1000/openpgp-card/ssh-agent.sock remote-system.tld&#xA;&#xA;2. Using the Socket on the remote system::&#xA;&#xA;SSH_AUTH_SOCK=$HOME/.tmp/ssh-agent.sock ssh root@some-other-system.tld&#xA;&#xA;Warning: This exposes the socket of opengp-card-ssh-agent to the remote system. Anyone with the neccesary privileges can use the session and access your local Smartcard, too. Use this with caution!&#xA;&#xA;#linux #ssh</html></oembed>