ssh image
This commit is contained in:
parent
ffce0bb8a0
commit
cc4ce82ec0
2 changed files with 23 additions and 0 deletions
11
ssh/Containerfile
Normal file
11
ssh/Containerfile
Normal 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
12
ssh/bashrc.sh
Normal 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
|
Loading…
Reference in a new issue