summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-03-05 17:03:48 +0100
committerThomas Haller <thaller@redhat.com>2014-06-30 17:42:09 +0200
commitfe267b0fd2fb31884aeab91cd4b6de9a8d1bc42c (patch)
tree883842ec57fc565e7f0f15fbaf488ec68f10f662
parent78f94726a7e6063921cc05325519eb09c421c40b (diff)
downloadNetworkManager-fe267b0fd2fb31884aeab91cd4b6de9a8d1bc42c.tar.gz
contrib/nm-live-vm: enable ssh server and add port forward from localhost:10022
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rwxr-xr-xcontrib/fedora/nm-live-vm/build.sh1
-rwxr-xr-xcontrib/fedora/nm-live-vm/nm-make-script.sh5
-rwxr-xr-xcontrib/fedora/nm-live-vm/run.sh2
3 files changed, 7 insertions, 1 deletions
diff --git a/contrib/fedora/nm-live-vm/build.sh b/contrib/fedora/nm-live-vm/build.sh
index 8cf734795d..bc1f06f24a 100755
--- a/contrib/fedora/nm-live-vm/build.sh
+++ b/contrib/fedora/nm-live-vm/build.sh
@@ -40,6 +40,7 @@ PACKAGES="kernel passwd git autoconf automake libtool intltool gtk-doc libnl3-de
vim
gdb valgrind lsof strace nmap-ncat tcpdump
net-tools bridge-utils vconfig
+ openssh-server
teamd libteam"
KERNEL_URL=http://kojipkgs.fedoraproject.org/packages/kernel/3.12.9/301.fc20/i686/kernel-3.12.9-301.fc20.i686.rpm
KERNEL=`basename "${KERNEL_URL%.rpm}"`
diff --git a/contrib/fedora/nm-live-vm/nm-make-script.sh b/contrib/fedora/nm-live-vm/nm-make-script.sh
index 79e1dff869..86ac67fe0a 100755
--- a/contrib/fedora/nm-live-vm/nm-make-script.sh
+++ b/contrib/fedora/nm-live-vm/nm-make-script.sh
@@ -49,6 +49,11 @@ level=DEBUG
domains=ALL
EOF
/bin/systemctl enable NetworkManager.service || exit 1
+/bin/systemctl enable sshd.service || exit 1
+
+sed -e 's/^#\?\(PermitRootLogin *\).*/\1yes/' \
+ -e 's/^#\?\(PermitEmptyPasswords *\).*/\1yes/' \
+ -i /etc/ssh/sshd_config
mkdir /mnt/sda1
echo "/dev/sda1 /mnt/sda1 vfat defaults 1 2" >> /etc/fstab
diff --git a/contrib/fedora/nm-live-vm/run.sh b/contrib/fedora/nm-live-vm/run.sh
index cb8b6db7c4..d0f1ed2f28 100755
--- a/contrib/fedora/nm-live-vm/run.sh
+++ b/contrib/fedora/nm-live-vm/run.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Three network interfaces
-NET_OPTIONS="-net nic -net user -net nic -net user -net nic -net user"
+NET_OPTIONS="-net nic -net user,hostfwd=tcp:127.0.0.1:10022-:22 -net nic -net user -net nic -net user"
OS="Linux"
if [ -f /etc/redhat-release ]; then