contrib/nm-live-vm: enable ssh server and add port forward from localhost:10022

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-03-05 17:03:48 +01:00
parent 78f94726a7
commit fe267b0fd2
3 changed files with 7 additions and 1 deletions

View file

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

View file

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

View file

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