mirror of
https://github.com/rancher/os.git
synced 2025-09-16 06:59:12 +00:00
Merge pull request #301 from imikushin/ssh
`./scripts/ssh` convenience script
This commit is contained in:
@@ -82,6 +82,7 @@ if [ -n "$CLOUD_CONFIG" ]; then
|
||||
else
|
||||
echo "#cloud-config" > ${USER_DATA}
|
||||
echo "ssh_authorized_keys:" >> ${USER_DATA}
|
||||
echo " - $(<${BASE}/assets/rancher.key.pub)" >> ${USER_DATA}
|
||||
for i in ${HOME}/.ssh/*.pub; do
|
||||
if [ -e $i ]; then
|
||||
echo " - $(<$i)" >> ${USER_DATA}
|
||||
@@ -89,7 +90,7 @@ else
|
||||
done
|
||||
fi
|
||||
|
||||
qemu-system-x86_64 -serial stdio \
|
||||
exec qemu-system-x86_64 -serial stdio \
|
||||
-kernel ${KERNEL} \
|
||||
-initrd ${INITRD_TEST} \
|
||||
-m 1024 \
|
||||
|
8
scripts/ssh
Executable file
8
scripts/ssh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
chmod 0600 ./assets/rancher.key
|
||||
|
||||
exec ssh -p 2222 -F ./assets/scripts_ssh_config -i ./assets/rancher.key rancher@localhost "$@"
|
Reference in New Issue
Block a user