Improve ssh-with-yubikey alias
This commit is contained in:
parent
ba98bec371
commit
9bfca72823
1 changed files with 4 additions and 1 deletions
|
@ -2,7 +2,10 @@
|
|||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ssh-with-yubikey = "ssh -A -R \"$(gpgconf --list-dirs agent-socket):$(gpgconf --list-dirs agent-socket)\" -o \"StreamLocalBindUnlink=yes\"";
|
||||
ssh-with-yubikey = "ssh_with_yubikey";
|
||||
};
|
||||
bashrcExtra = ''
|
||||
ssh_with_yubikey () { AGENT_SOCKET=$(ssh $@ gpgconf --list-dirs agent-socket) && ssh -A -R "$AGENT_SOCKET:$(gpgconf --list-dirs agent-socket)" -o "StreamLocalBindUnlink=yes" $@; }
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue