1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 22:32:14 +00:00

./scripts/ssh convenience script

run `./scripts/ssh` to easily ssh into the RancherOS KVM instance started with `./scripts/run`
This commit is contained in:
Ivan Mikushin
2015-05-07 13:09:25 +05:00
parent f60bb0afa4
commit 26aae6303f
5 changed files with 38 additions and 0 deletions

View File

@@ -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}

6
scripts/ssh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
set -e
cd $(dirname $0)/..
exec ssh -p 2222 -F ./assets/scripts_ssh_config -i ./assets/rancher.key rancher@localhost