mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
kubernetes: ssh_into_kubelet.sh for Linux
Only with networking in bridge (or probably tap) modes, not user mode. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
9f04b403e4
commit
7d7001c573
@ -1,9 +1,18 @@
|
||||
#!/bin/bash -eux
|
||||
ssh="docker run --rm -ti \
|
||||
-v $HOME/.ssh/:/root/.ssh \
|
||||
ijc25/alpine-ssh \
|
||||
-o LogLevel=FATAL \
|
||||
#!/bin/bash -eu
|
||||
|
||||
sshopts="-o LogLevel=FATAL \
|
||||
-o StrictHostKeyChecking=no \
|
||||
-o UserKnownHostsFile=/dev/null \
|
||||
-o IdentitiesOnly=yes"
|
||||
$ssh -t root@"$1" ctr exec --tty --exec-id ssh kubelet ash -l
|
||||
|
||||
case $(uname -s) in
|
||||
Linux)
|
||||
ssh=ssh
|
||||
;;
|
||||
*)
|
||||
ssh="docker run --rm -ti \
|
||||
-v $HOME/.ssh/:/root/.ssh \
|
||||
ijc25/alpine-ssh"
|
||||
;;
|
||||
esac
|
||||
$ssh $sshopts -t root@"$1" ctr exec --tty --exec-id ssh kubelet ash -l
|
||||
|
Loading…
Reference in New Issue
Block a user