diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-05-02 22:33:24 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-05-02 22:33:24 +0200 |
commit | 4cf668d9a23e39fbc8a215cc7876f95291722366 (patch) | |
tree | 5099b74d7bb3056842c7ddede49370ea4829e995 /config | |
parent | 595d88df8cc39b304951a8e487109e336daaebdf (diff) |
Add sshids alias and ssh_keyadd function
Diffstat (limited to 'config')
-rw-r--r-- | config/essentials/shell/aliases.sh | 2 | ||||
-rw-r--r-- | config/essentials/shell/functions.sh | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index 68b66f2..d5f3e7f 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -3,6 +3,7 @@ # The most important one alias vi='nvim' +alias cd='z' # Zsh specific aliases if [ $SHELL = "/bin/zsh" ] @@ -149,6 +150,7 @@ alias wd='dict' # ssh alias sha='ssh-add' alias sshs='eval "$(ssh-agent)" && ssh-add' +alias sshids='ssh-add -L | xargs -I{} grep "{}" -l $(find "$HOME/.ssh" -type f -iname '\''*.pub'\'') | sed "s;$HOME/.ssh/;;;s;\.pub$;;"' alias whatsmyip='curl -s "ifconfig.co"' alias icognito='unset HISTFILE' alias webcam='v4l2-ctl --set-fmt-video=width=1280,height=720; mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 --profile=low-latency --untimed --no-resume-playback' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 99d854e..8172c73 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -330,3 +330,5 @@ serve() { --publish 80:5000 sigoden/dufs /data --allow-upload fi } + +ssh_keyadd() { ssh-keygen -f "$HOME"/.ssh/"$1" -P "$(pass generate -f keys/"$HOST"/ssh/"$1" | tail -n 1)" -t ed25519; } |