ssh image
All checks were successful
Build images / build-images-arm64 (push) Successful in 12m21s
Build images / build-images-amd64 (push) Successful in 15m14s
Build images / update-images-manifests (push) Successful in 40s

This commit is contained in:
Maciej Lebiest 2024-11-04 16:29:00 +01:00 committed by Maciej Lebiest
parent ffce0bb8a0
commit cc4ce82ec0
2 changed files with 23 additions and 0 deletions

11
ssh/Containerfile Normal file
View file

@ -0,0 +1,11 @@
FROM registry.fedoraproject.org/fedora-minimal:40
RUN dnf5 install -y openssh-clients bash-completion fzf && \
dnf5 autoremove -y && \
dnf5 clean all
COPY bashrc.sh /root/.bashrc
WORKDIR /root
ENTRYPOINT ["/bin/bash", "-c", "echo \"$(ssh-agent -s)\" >/root/ssh_agent_eval && exec bash"]

12
ssh/bashrc.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
source /etc/profile
eval "$(cat /root/ssh_agent_eval)";
source /usr/share/fzf/shell/key-bindings.bash;
ssh() {
/bin/ssh -o HostKeyAlgorithms=+ssh-dss \
-o PubkeyAcceptedKeyTypes=+ssh-rsa,ssh-dss \
"$@"
}
ssh-add -l | grep 'The agent has no identities' && ssh-add