aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-03-06 17:50:00 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-03-06 17:50:00 -0300
commit4c4a2f4bf0d56ca05ddab87f47d97c5ae59796b7 (patch)
tree3c2c5c6392c677a1a3ea88d017467bf301b5a316
parent180a08968334dfa2ef44b51a522cc2605b9226d4 (diff)
downloadvbox-4c4a2f4bf0d56ca05ddab87f47d97c5ae59796b7.tar.gz
vbox-4c4a2f4bf0d56ca05ddab87f47d97c5ae59796b7.tar.bz2
Passwordless support using an insecure SSH keypair
-rwxr-xr-xkvmx3
-rw-r--r--ssh/insecure_private_key51
-rw-r--r--ssh/insecure_private_key.pub1
3 files changed, 54 insertions, 1 deletions
diff --git a/kvmx b/kvmx
index b12eb77..00a41be 100755
--- a/kvmx
+++ b/kvmx
@@ -5,6 +5,7 @@
# Parameters
BASENAME="`basename $0`"
+DIRNAME="`dirname $0`"
STORAGE="/var/cache/qemu"
SHARED="/var/data/load"
PORT="$(($RANDOM + 1024))"
@@ -15,7 +16,7 @@ BOX="$STORAGE/$VM/box.img"
PIDFILE="$STORAGE/$VM/pid"
PORTFILE="$STORAGE/$VM/port"
SSHFILE="$STORAGE/$VM/ssh"
-SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
+SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=FATAL -i $DIRNAME/ssh/insecure_private_key"
LOGIN="user"
# Run spice client
diff --git a/ssh/insecure_private_key b/ssh/insecure_private_key
new file mode 100644
index 0000000..50b69ca
--- /dev/null
+++ b/ssh/insecure_private_key
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKgIBAAKCAgEA1RZidlA59nSt5xxwJB87fBeAH610xYhmvoLnpvdkv6c7TBgF
+A4xGQWBFt5mfAE8qOBqD2fdrZI5q2tBYL+hEyKMfkj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bEO+Eq0QebVS7FhlIiSq42QBN+dgSVnLHhpbhw2V+
+M//NxEK9SyEQAvHl11O/83j93W0eT9vQ03b/LHtq065l+DkO+7jRmzWlr339LSze
+i60+r+Hw+LWbNtMw1XWvaM9q+nbkg3RFsXk5QxF22M9LtYiqGo9n8pyJwW1WjRUt
+qofzVSzWnS44e+iTBZuhCFn7SS7afWkTHmZ2TCi0hhLZ1Z1lFNUBj0CPp+u1uJqo
+zQhFUgUCggEASukdtzMuga+E3qSzowBaTz7Ml0Vl/0b/6XsXK3REPgs/mWSMPk8A
+HIYxHudTh5C32yYsOQssiBInE2F6kBJLRCgHPG4Tauk0L3U7dhpeMArtBMpAV3sJ
+hQXqca8Lqj8xD+1Absuf5ASw7Ifz8gUTs1sKKOQDJKEtL5v7dvXO6hqQeJxwwHSd
+zpwrg7DLjvWlNcAYKTAJsbITCOLwfAzkL8I/zYF2XLXM/6h+ocQIdyhfP+LrYCcZ
+Jgs0fBXi7oIqB3lEttCWCohKK50IPEAgjP5Lc4rOgEp/p6L7TLAsCR+cIGbtNjCp
+8imYaeOhegqYgBi1CQRFUdmgSOHucc8qyQKCAQEA/POTzwt/kh9cT54KwoIz4ikd
+qdpbDv2vgVL0fyWd+Yb9jEzNtsbG1FNEQwhjDDFReanjupeOLXUT10V8ddour3DI
+b14RpC/Fbtcl0WaCzfDM6xcKafWJ5CrO0lwQU1tBVY/9E6SBaF93fMKChimAWsx9
+cQZ2rfdyBY80AkyZUea3kv6JNJ92gccoUWcRW/ahwgcZw5I0m4sU+8xvVofXXZ6Z
+OE6by7Ti9uifYKftGKqTW2slqEFuXDZ4rGCo6Vews+dcULKIxEW7RJs2yFwM2exn
+3PluzR+5pFODuFh9HAZHJKO3vXRknchCC1E/UIUGZI8t2r88JXVBmlERC+UWJw==
+-----END RSA PRIVATE KEY-----
diff --git a/ssh/insecure_private_key.pub b/ssh/insecure_private_key.pub
new file mode 100644
index 0000000..a82f4e9
--- /dev/null
+++ b/ssh/insecure_private_key.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDVFmJ2UDn2dK3nHHAkHzt8F4AfrXTFiGa+guem92S/pztMGAUDjEZBYEW3mZ8ATyo4GoPZ92tkjmra0Fgv6ETIox+SPWbzzjhzbv2CQUTWvF6PEVwJbT1PTzaIVRiDYf+yX7e3Y8HcmkAi60Cxs5Xr3HLkqdi2jYKFofCm58R+HGnRv1WSurPnf7C7KQBSW7E1S2CafW9VFHhGCzezyThjN+n3bJjgYFzPxdTlWyfW1T7Yv61/fqfuara0kpZx1l5pblpgbCTT7WKRIhwj1x0QTo/qDQ6k52tffiCVyMGJKvires9yp5qT5Y+ldssBKDa8muRF/dh7/UCyxvcm3HTDjWG24Sr4r9JWbhkqF89UePlOw5j73qw4gzT7YQ38tzz2XI5weAL1OXM6qhCbOwfPXwYbB5xM4g62WZugtcCLan6Iy8hvoiRIJ1MU2ar73wunghQQ84oNIrEVezJsuZxwxVbe45ulnM7x4Hqeu6jmOutWFkdkAHsqd1E3zTOS1RURwi0TpnD+iWwD7FOA9c8B6AWP4i9XVW6BLi1waARrS3bVnOh3djc20fVsClfEDDXFg2KiTeQaAWfjLguyUmxysSiUC2pnibd1bEDtdfPlkA2jaE2nAn6Tw7Vp5zd8P1d1trLMx3YkRq5uQSPqnfQDKoYH5FPMlNTbMINLC56ijw== user@kvmx